<HTML>
<HEAD>
<TITLE> INSPEKT User's Guide </TITLE>
</HEAD>

<BODY style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">

<A NAME="top"></A>

<TABLE STYLE="text-align: left; margin-left: auto; margin-right: auto; width: 800px;" BORDER="0" CELLPADDING="5" CELLSPACING="2">
<TBODY>
<TR>
  <TD STYLE="background-color: rgb(153, 153, 153); vertical-align: middle; text-align: center;">
  <DIV ALIGN="right">
    <SMALL><SMALL><A HREF="index.html">Index Page</A></SMALL></SMALL>
  </DIV>
  <B>INSPEKT User's Guide</B> </TD>
</TR>
<TR>
  <TD STYLE="vertical-align: top;">

<H2> Table of Contents
</H2>

<PRE>
   <A HREF="#INSPEKT User's Guide">INSPEKT User's Guide</A>
      <A HREF="#Abstract">Abstract</A>
      <A HREF="#About INSPEKT's Built-in Help System">About INSPEKT's Built-in Help System</A>
         <A HREF="#Related Topics">Related Topics</A>
   <A HREF="#Autoadjust">Autoadjust</A>
   <A HREF="#Collecting Commands In Files">Collecting Commands In Files</A>
         <A HREF="#Related Topics0">Related Topics</A>
   <A HREF="#Column">Column</A>
         <A HREF="#Related Topics1">Related Topics</A>
   <A HREF="#Column and Table Abbreviations">Column and Table Abbreviations</A>
         <A HREF="#Related Topics2">Related Topics</A>
   <A HREF="#Columns">Columns</A>
         <A HREF="#Related Topics3">Related Topics</A>
   <A HREF="#Combining Tables">Combining Tables</A>
         <A HREF="#Equi-joins">Equi-joins</A>
         <A HREF="#Ambiguous Columns">Ambiguous Columns</A>
         <A HREF="#Joining a Table to Itself">Joining a Table to Itself</A>
         <A HREF="#Using Aliases">Using Aliases</A>
         <A HREF="#Combining More than Two Tables">Combining More than Two Tables</A>
   <A HREF="#Conditional Operators">Conditional Operators</A>
         <A HREF="#Related Topics4">Related Topics</A>
   <A HREF="#Current Settings --- SHOW">Current Settings --- SHOW</A>
   <A HREF="#Custom Formats">Custom Formats</A>
         <A HREF="#Related Topics5">Related Topics</A>
   <A HREF="#Default Floating Format">Default Floating Format</A>
         <A HREF="#Related Topics6">Related Topics</A>
   <A HREF="#Default Integer Format">Default Integer Format</A>
         <A HREF="#Related Topics7">Related Topics</A>
   <A HREF="#Default Time Format">Default Time Format</A>
         <A HREF="#Related Topics8">Related Topics</A>
   <A HREF="#Deluge Warning">Deluge Warning</A>
         <A HREF="#Related Topics9">Related Topics</A>
   <A HREF="#Display Area">Display Area</A>
         <A HREF="#Related Topics10">Related Topics</A>
   <A HREF="#Echoing Translated Commands">Echoing Translated Commands</A>
   <A HREF="#Editing Commands">Editing Commands</A>
         <A HREF="#Related Topics11">Related Topics</A>
   <A HREF="#Environment Variables">Environment Variables</A>
   <A HREF="#Errors">Errors</A>
         <A HREF="#Related Topics12">Related Topics</A>
   <A HREF="#Example Time Formats">Example Time Formats</A>
         <A HREF="#Related Topics13">Related Topics</A>
   <A HREF="#Example Where Clause">Example Where Clause</A>
   <A HREF="#Flagged Format">Flagged Format</A>
   <A HREF="#From Clause">From Clause</A>
   <A HREF="#Getting Too Much Data">Getting Too Much Data</A>
         <A HREF="#Related Topics14">Related Topics</A>
   <A HREF="#Headers">Headers</A>
   <A HREF="#Kernels --- LOAD">Kernels --- LOAD</A>
   <A HREF="#Limits">Limits</A>
   <A HREF="#Looking at Data --- SELECT">Looking at Data --- SELECT</A>
         <A HREF="#Related Topics15">Related Topics</A>
   <A HREF="#Making Help Wait">Making Help Wait</A>
         <A HREF="#Related Topics16">Related Topics</A>
   <A HREF="#Numeric Formats">Numeric Formats</A>
   <A HREF="#Order By">Order By</A>
         <A HREF="#Related Topics17">Related Topics</A>
   <A HREF="#Pattern Matching">Pattern Matching</A>
   <A HREF="#Patterns">Patterns</A>
   <A HREF="#Query">Query</A>
   <A HREF="#Reports">Reports</A>
         <A HREF="#Related Topics18">Related Topics</A>
   <A HREF="#Sampling Data">Sampling Data</A>
   <A HREF="#Saving Work --- SAVE TO">Saving Work --- SAVE TO</A>
   <A HREF="#Select Clause">Select Clause</A>
         <A HREF="#Related Topics19">Related Topics</A>
   <A HREF="#SET COLUMN ...">SET COLUMN ...</A>
   <A HREF="#SET FORMAT ...">SET FORMAT ...</A>
         <A HREF="#Related Topics20">Related Topics</A>
   <A HREF="#SET FORMAT MARK ...">SET FORMAT MARK ...</A>
   <A HREF="#SET HEADER ...">SET HEADER ...</A>
         <A HREF="#Related Topics21">Related Topics</A>
   <A HREF="#SET PAGE ...">SET PAGE ...</A>
         <A HREF="#Related Topics22">Related Topics</A>
   <A HREF="#SET TIME ...">SET TIME ...</A>
         <A HREF="#Related Topics23">Related Topics</A>
   <A HREF="#SET TITLE ...">SET TITLE ...</A>
         <A HREF="#Related Topics24">Related Topics</A>
   <A HREF="#Setting The Editor">Setting The Editor</A>
   <A HREF="#Setting up Inspekt --- SET">Setting up Inspekt --- SET</A>
   <A HREF="#Short Cut to Topics">Short Cut to Topics</A>
   <A HREF="#SHOW COLUMN ...">SHOW COLUMN ...</A>
         <A HREF="#Related Topics25">Related Topics</A>
   <A HREF="#SHOW COMMENTS ...">SHOW COMMENTS ...</A>
   <A HREF="#SHOW ENVIRONMENT ...">SHOW ENVIRONMENT ...</A>
         <A HREF="#Related Topics26">Related Topics</A>
   <A HREF="#SHOW FORMAT ...">SHOW FORMAT ...</A>
         <A HREF="#Related Topics27">Related Topics</A>
   <A HREF="#SHOW INDEXED ...">SHOW INDEXED ...</A>
   <A HREF="#SHOW KERNELS ...">SHOW KERNELS ...</A>
         <A HREF="#Related Topics28">Related Topics</A>
   <A HREF="#SHOW PAGE ...">SHOW PAGE ...</A>
   <A HREF="#SHOW SUMMARY ...">SHOW SUMMARY ...</A>
   <A HREF="#Special Symbols --- Queries">Special Symbols --- Queries</A>
   <A HREF="#Specifying Strings">Specifying Strings</A>
         <A HREF="#Related Topics29">Related Topics</A>
   <A HREF="#Specifying Times">Specifying Times</A>
         <A HREF="#Spacecraft Clock">Spacecraft Clock</A>
         <A HREF="#ISO Formats">ISO Formats</A>
         <A HREF="#Generic">Generic</A>
         <A HREF="#Related Topics30">Related Topics</A>
   <A HREF="#Symbol">Symbol</A>
   <A HREF="#Syntax Description Language">Syntax Description Language</A>
      <A HREF="#Keywords">Keywords</A>
      <A HREF="#Class Templates">Class Templates</A>
         <A HREF="#number">number</A>
         <A HREF="#int">int</A>
         <A HREF="#word">word</A>
         <A HREF="#name">name</A>
         <A HREF="#calendar">calendar</A>
         <A HREF="#Template Quantifiers">Template Quantifiers</A>
         <A HREF="#Numeric Qualifiers">Numeric Qualifiers</A>
         <A HREF="#Character Qualifiers">Character Qualifiers</A>
      <A HREF="#Combining Quantifiers with Qualifiers">Combining Quantifiers with Qualifiers</A>
      <A HREF="#Switches">Switches</A>
         <A HREF="#Nesting Switches">Nesting Switches</A>
      <A HREF="#Examples">Examples</A>
   <A HREF="#Syntax Summaries">Syntax Summaries</A>
         <A HREF="#Related Topics31">Related Topics</A>
   <A HREF="#Table">Table</A>
   <A HREF="#Tabular Format">Tabular Format</A>
         <A HREF="#TABULAR">TABULAR</A>
         <A HREF="#MARKED TABULAR">MARKED TABULAR</A>
         <A HREF="#SPACED TABULAR">SPACED TABULAR</A>
         <A HREF="#Related Topics32">Related Topics</A>
   <A HREF="#Tabular Format Mark">Tabular Format Mark</A>
         <A HREF="#Related Topics33">Related Topics</A>
   <A HREF="#Time Formats">Time Formats</A>
   <A HREF="#Titles">Titles</A>
   <A HREF="#Typing Commands">Typing Commands</A>
   <A HREF="#Using Symbols">Using Symbols</A>
         <A HREF="#An Example">An Example</A>
         <A HREF="#Creating Symbols">Creating Symbols</A>
         <A HREF="#Removing Symbols">Removing Symbols</A>
         <A HREF="#Symbols Used in Other Symbols">Symbols Used in Other Symbols</A>
         <A HREF="#Suppressing Symbols Substitution">Suppressing Symbols Substitution</A>
         <A HREF="#Examining Symbols">Examining Symbols</A>
   <A HREF="#Verbatim Format">Verbatim Format</A>
         <A HREF="#Related Topics34">Related Topics</A>
   <A HREF="#Where Clause">Where Clause</A>
         <A HREF="#Related Topics35">Related Topics</A>
   <A HREF="#Problems, Suggestions">Problems, Suggestions</A>

</PRE>

<HR SIZE=3 NOSHADE>

<BR><BR>
<A NAME="INSPEKT User's Guide"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> INSPEKT User's Guide
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Last revised on 2002 DEC 13 by W. L. Taber.
<P>
 
<BR><BR>
<A NAME="Abstract"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Abstract
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   INSPEKT is an interactive program that examines the contents of an
   events component (ESQ) of an E-kernel.
<P>
 
<BR><BR>
<A NAME="About INSPEKT's Built-in Help System"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> About INSPEKT's Built-in Help System
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   You've already discovered the basics of Inspekt's Help system. When you
   type "help;" (or "HELP;") a menu is displayed such as the one below:
<P>
 
<PRE>
   (Q) Quit Help
   (1) About Help
         ...
   Option: _
</PRE>
   At the prompt (Option: ) type the number or letter shown in parentheses
   to the left of the topic of interest and hit RETURN. You will be
   presented with a screen of text that describes the topic.
<P>
 
   After a full screen of text has been displayed, a left justified short
   vertical line will be displayed. Just to the right of this line will be
   the cursor. This indicates there is more text or related topics
   associated with the current topic. Hit a carriage return to display the
   additional information. If there is more text on the topic, you will see
   another screen of text followed by the same short line and prompt. If
   there is no more text for the current topic, another menu of options
   will be displayed allowing you to exit the help system; return to the
   main menu; or move on to topics related to the current topic.
<P>
 
<BR><BR>
<A NAME="Related Topics"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Short Cut to Topics, Making Help Wait
<P>
 
<BR><BR>
<A NAME="Autoadjust"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Autoadjust
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   The "page" on which reports are displayed is often too narrow to hold a
   tabular report. However, by adjusting the width of some columns it may
   be possible to fit the report in the available space. If this is true,
   Inspekt will ask whether or not it should temporarily (for the duration
   of the report) adjust column widths so that the report may be printed.
   This feature is called "AUTOADJUST". By default, AUTOADJUST is set up so
   that Inspekt asks you whether or not it should adjust some column widths
   to fit a report on the current page. This default action can be modified
   by using the SET AUTOADJUST command. You can set the automatic action to
<P>
 
<UL>
<TT>1.</TT> Prohibit display of reports that are too wide.
<BR><BR></UL>
<UL>
<TT>2.</TT> Ask whether or not a columns should be narrowed to accommodate a wide
report (default)
<BR><BR></UL>
<UL>
<TT>3.</TT> Automatically adjust column widths and display reports.
<BR><BR></UL>
   The syntax for this command is:
<P>
 
<PRE>
      SET AUTOADJUST (1:1){ OFF | ASK | ON }
</PRE>
   To see the current status of AUTOADJUST type the command
<P>
 
<PRE>
   SHOW FORMAT
</PRE>
   Note: AUTOADJUST does not affect the widths of numeric or time columns.
   Only character columns are affected by AUTOADJUST.
<P>
 
<BR><BR>
<A NAME="Collecting Commands In Files"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Collecting Commands In Files
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Inspekt allows you to collect frequently executed sequences of command
   in files called Inspekt Procedure Files.
<P>
 
   To create a procedure file, simply type in a sequence of commands as you
   would type them when entering them in Inspekt. End each command with a
   semi-colon. Start every new command on a new line.
<P>
 
   You can insert a "comment" line in the procedure file by starting the
   line with a semi-colon (;).
<P>
 
   To start a procedure file enter the command:
<P>
 
<PRE>
   START filename;
</PRE>
   where "filename" above is replaced by the name of your procedure file.
<P>
 
   Procedure files may start other procedure files. Procedure commands may
   not use any of the following commands:
<P>
 
<PRE>
   EDIT
   DO
   RECALL
</PRE>
   or a command that evaluates to one of these commands as a result of
   symbol substitution.
<P>
 
   If there is information that a procedure needs, you can pass that
   information to the procedure by creating one or more symbols that
   evaluate to the needed information.
<P>
 
<BR><BR>
<A NAME="Related Topics0"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Using Symbols
<P>
 
<BR><BR>
<A NAME="Column"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Column
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When we collect data about events (or any other set of objects) a
   decision must be made about what aspects of the event shall be recorded.
   Usually some of these aspects (attributes) of events will change from
   one event to the next. It is the variation in these attributes that
   allow us to distinguish one event from another. An individual attribute
   of the event is called a column of the event. This term arises from the
   common way in which data is presented on a page. If we list all of the
   events we have recorded on a sheet of paper (or a terminal) so that the
   attributes for each event are always listed in the same order from left
   to right, then the attributes for different events appear in columns on
   the page.
<P>
 
<BR><BR>
<A NAME="Related Topics1"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Column
<P>
 
<BR><BR>
<A NAME="Column and Table Abbreviations"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Column and Table Abbreviations
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When someone creates a table and column names for the table they are
   presented with the following problem. The various names should be
   meaningful and they should be easy to type. If an easy to type name is
   not meaningful, it won't be very useful in describing the table or a
   column. Since tables and columns are usually meant to exist for a long
   time, table producers often err on the side of creating names that are
   meaningful but are a bit difficult to type.
<P>
 
   Inspekt helps you deal with the problem of minimizing the amount of text
   you have to type to specify a table or column by allowing you to use a
   pattern instead of the full name. For example suppose that a column has
   the name EMPLOYEE_SALARY. If there are no other columns that start with
   "EMP", you can specify this column by typing "EMP*". If there are
   several column names that start with "EMPLOYEE_" but only one column
   name ends with "SALARY" you can specify the column by typing "*_SAL*".
   As long as only one name matches the pattern, Inspekt will recognize the
   name and treat the pattern as if you had typed the full name.
<P>
 
   For example suppose that you have loaded an E-kernel that contains two
   tables "EMPLOYEE_DATA" and "DEPARTMENT_DATA". Moreover suppose that the
   first table contains the following columns: "EMPLOYEE_NAME",
   "SUPERVISOR", "HIRE_DATE", "SALARY", "DEPARTMENT". Suppose the second
   table has the following columns: "DEPARTMENT_NAME",
   "OPERATING_EXPENSES", "MANAGER", "LOCATION".
<P>
 
   Then the following query
<P>
 
<PRE>
   SELECT EMP*, SAL*, DEP* FROM EMP* WHERE SAL* &gt; 30000;
</PRE>
   is equivalent to the much longer command
<P>
 
<PRE>
   SELECT EMPLOYEE_NAME, SALARY, DEPARTMENT
   FROM EMPLOYEE_DATA
   WHERE SALARY &gt; 30000;
</PRE>
   You can patterns only for column and table names. You may not use them
   to abbreviate other words of the Inspekt command language. If some
   language words or phrases seem to be a bit long to type you should
   consider creating a symbol for those words or phrases.
<P>
 
<BR><BR>
<A NAME="Related Topics2"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Column and Table Abbreviations, Pattern Matching, Using Symbols, Special
   Symbols --- Queries
<P>
 
<BR><BR>
<A NAME="Columns"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Columns
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   To see a list of all columns that are currently available in Inspekt,
   type the command
<P>
 
<PRE>
   SHOW SUMMARY
</PRE>
   You will be presented with a list of column names in the form
   "table_name.column_name" where "table_name" is the name of the table to
   which the column belongs and "column_name" is the name of the column. To
   see attributes for a particular column, type
<P>
 
<PRE>
     SHOW COLUMN column_name
   or
     SHOW COLUMN table_name.column_name
</PRE>
   The second form is required only if there are two or more loaded tables
   that have the same column.
<P>
 
   To see a list of indexed columns type:
<P>
 
<PRE>
   SHOW INDEXED
</PRE>
<BR><BR>
<A NAME="Related Topics3"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Column and Table Abbreviations, Pattern Matching, Using Symbols, Special
   Symbols --- Queries, SET COLUMN ..., Reports, Time Formats, Autoadjust
<P>
 
<BR><BR>
<A NAME="Combining Tables"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Combining Tables
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Data in one row of a table can be connected with data in a row of a
   second (possibly the same) table by a process called "joining" the
   tables.
<P>
 
   The "join" of two tables is the cartesian product of the two tables. For
   example suppose that the tables MUSIC and PEOPLE have been loaded into
   Inspekt. Table MUSIC has two columns SONG and COMPOSER, Table PEOPLE has
   columns NAME and COUNTRY. Below is a sample of the data in these two
   tables.
<P>
 
<PRE>
   Table MUSIC
 
   SONG              COMPOSER
   --------------------------
   YESTERDAY         MCCARTNEY
   LIVE AND LET DIE  MCCARTNEY
   BLOODY SUNDAY     HEUSSEN
   ONE TREE HILL     HEUSSEN
   SATISFACTION      JAGGER
   BOYS OF SUMMER    HENLEY
 
 
   Table PEOPLE
 
   NAME             COUNTRY
   --------------------------
   MCCARTNEY        ENGLAND
   HEUSSEN          IRELAND
   JAGGER           ENGLAND
   HENLEY           USA
</PRE>
   The two tables have sufficient information to tell us the names of all
   the songs written by Irish composers. But, how do we get Inspekt to tell
   us this information.
<P>
 
   We "join" the two tables so that everything is in one large table. Below
   is the join of the tables MUSIC and PEOPLE. (We've included blank lines
   to help illustrate how rows are combined to make the join table. Also
   for purpose of illustration only, we've presented the data from the
   second table in lower case. In the actual join the case of data does not
   change.)
<P>
 
<PRE>
   Join of tables MUSIC, PEOPLE
 
   SONG              COMPOSER   NAME       COUNTRY
   -----------------------------------------------
   YESTERDAY         MCCARTNEY  mccartney  england
   YESTERDAY         MCCARTNEY  heussen    ireland
   YESTERDAY         MCCARTNEY  jagger     england
   YESTERDAY         MCCARTNEY  henley     usa
 
   LIVE AND LET DIE  MCCARTNEY  mccartney  england
   LIVE AND LET DIE  MCCARTNEY  heussen    ireland
   LIVE AND LET DIE  MCCARTNEY  jagger     england
   LIVE AND LET DIE  MCCARTNEY  henley     usa
 
   BLOODY SUNDAY     HEUSSEN    mccartney  england
   BLOODY SUNDAY     HEUSSEN    heussen    ireland
   BLOODY SUNDAY     HEUSSEN    jagger     england
   BLOODY SUNDAY     HEUSSEN    henley     usa
 
   ONE TREE HILL     HEUSSEN    mccartney  england
   ONE TREE HILL     HEUSSEN    heussen    ireland
   ONE TREE HILL     HEUSSEN    jagger     england
   ONE TREE HILL     HEUSSEN    HENLEY     USA
 
   SATISFACTION      JAGGER     mccartney  england
   SATISFACTION      JAGGER     heussen    ireland
   SATISFACTION      JAGGER     jagger     england
   SATISFACTION      JAGGER     henley     usa
 
   BOYS OF SUMMER    HENLEY     mccartney  england
   BOYS OF SUMMER    HENLEY     heussen    ireland
   BOYS OF SUMMER    HENLEY     jagger     england
   BOYS OF SUMMER    HENLEY     henley     usa
</PRE>
   To select something from this join of two tables you construct your
   SELECT command as shown here:
<P>
 
<PRE>
   select item, ... , item
   FROM   MUSIC, PEOPLE
   where ...
</PRE>
   The tables we want to join are specified in the FROM clause of the
   select command. They must be separated by commas.
<P>
 
   Notice that every row of the first table, MUSIC, has every row of the
   second table, PEOPLE appended to it to produce a new row. This table
   becomes useful when we apply constraints to it. In our case we want to
   find out which songs were written by Irish song writers.
<P>
 
   The country of origin of the composer is present in a row of the join
   table if the NAME and COMPOSER columns have the same value. The SELECT
   command
<P>
 
<PRE>
   select song, composer, name, country
   from music, people
   WHERE COMPOSER = NAME
</PRE>
   gives us the following rows.
<P>
 
<PRE>
   SONG              COMPOSER   NAME       COUNTRY
   -----------------------------------------------
   YESTERDAY         MCCARTNEY  MCCARTNEY  ENGLAND
   LIVE AND LET DIE  MCCARTNEY  MCCARTNEY  ENGLAND
   BLOODY SUNDAY     HEUSSEN    HEUSSEN    IRELAND
   ONE TREE HILL     HEUSSEN    HEUSSEN    IRELAND
   SATISFACTION      JAGGER     JAGGER     ENGLAND
   BOYS OF SUMMER    HENLEY     HENLEY     USA
</PRE>
   This report is a lot closer to what we want.
<P>
 
   To see just the titles of songs written by Irish song writers we add
   modify the SELECT command as shown below.
<P>
 
<PRE>
   select SONG
   from music, people
   where composer = name
   AND   COUNTRY  = 'IRELAND'
</PRE>
   This results in the following report.
<P>
 
<PRE>
   SONG
   --------------
   BLOODY SUNDAY
   ONE TREE HILL
</PRE>
<BR><BR>
<A NAME="Equi-joins"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Equi-joins
</H3><P><BR><BR>
   In the previous example we had the condition
<P>
 
<PRE>
   WHERE COMPOSER = NAME
</PRE>
   This is a common condition when selecting data from a join of two
   tables. The general situation looks something like this.
<P>
 
<PRE>
   SELECT ...
   FROM   table_1, table_2
   WHERE  column_from_table_1 = column_from_table_2
</PRE>
   When you join two or more tables and add an equality a condition to the
   rows from different tables, the join is called an "equi-join". You will
   almost always create equi-joins when joining tables.
<P>
 
<BR><BR>
<A NAME="Ambiguous Columns"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Ambiguous Columns
</H3><P><BR><BR>
   Suppose in the following example the table PEOPLE had the columns
   COMPOSER and COUNTRY instead of NAME and COUNTRY. The simple view of the
   join now becomes:
<P>
 
<PRE>
   SONG              COMPOSER   COMPOSER   COUNTRY
   -----------------------------------------------
   YESTERDAY         MCCARTNEY  MCCARTNEY  ENGLAND
   YESTERDAY         MCCARTNEY  HEUSSEN    IRELAND
   YESTERDAY         MCCARTNEY  JAGGER     ENGLAND
   YESTERDAY         MCCARTNEY  HENLEY     USA
   LIVE AND LET DIE  MCCARTNEY  MCCARTNEY  ENGLAND
           .            .           .        .
           .            .           .        .
           .            .           .        .
</PRE>
   If I want to talk about the column first column COMPOSER how do I
   distinguish it from the second column COMPOSER? The first column comes
   from the table MUSIC the second comes from the table PEOPLE. To
   unambiguously specify either prefix the column name by the name of its
   parent table as in MUSIC.COMPOSER or PEOPLE.COMPOSER. The select command
   would then be issued as:
<P>
 
<PRE>
   select song
   from music, people
   where MUSIC.COMPOSER = PEOPLE.COMPOSER
   and   country  = 'IRELAND'
</PRE>
<BR><BR>
<A NAME="Joining a Table to Itself"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Joining a Table to Itself
</H3><P><BR><BR>
   Sometimes it is useful to be able to join a table to itself. This is
   particularly true if the table contains some kind of hierarchical
   information such as in child-parent pairs. For example here is a list of
   family members and their parents
<P>
 
<PRE>
   Table RELATIONS
   CHILD    FATHER   MOTHER
   ------------------------
   CINDY    GEORGE   ALICE
   SALLY    GEORGE   MARTHA
   GEORGE   WILLIAM  MARGARET
   ALICE    JOHN     KATHERINE
   MARTHA   ROBERT   CONSTANCE
</PRE>
   The grandparents in this table are parents of parents. We can join the
   table to itself to get a list of all the grandfathers. The join is
   simple enough. Here it is.
<P>
 
<PRE>
   Join of RELATIONS, RELATIONS
 
   CHILD    FATHER   MOTHER     CHILD   FATHER    MOTHER
   ---------------------------------------------------------
   CINDY    GEORGE   ALICE      CINDY   GEORGE    ALICE
   CINDY    GEORGE   ALICE      SALLY   GEORGE    MARTHA
   CINDY    GEORGE   ALICE      GEORGE  WILLIAM   MARGARET
   CINDY    GEORGE   ALICE      ALICE   JOHN      KATHERINE
   CINDY    GEORGE   ALICE      MARTHA  ROBERT    CONSTANCE
   SALLY    GEORGE   MARTHA     CINDY   GEORGE    ALICE
   SALLY    GEORGE   MARTHA     SALLY   GEORGE    MARTHA
   SALLY    GEORGE   MARTHA     GEORGE  WILLIAM   MARGARET
   SALLY    GEORGE   MARTHA     ALICE   JOHN      KATHERINE
   SALLY    GEORGE   MARTHA     MARTHA  ROBERT    CONSTANCE
   GEORGE   WILLIAM  MARGARET   CINDY   GEORGE    ALICE
   GEORGE   WILLIAM  MARGARET   SALLY   GEORGE    MARTHA
   GEORGE   WILLIAM  MARGARET   GEORGE  WILLIAM   MARGARET
   GEORGE   WILLIAM  MARGARET   ALICE   JOHN      KATHERINE
   GEORGE   WILLIAM  MARGARET   MARTHA  ROBERT    CONSTANCE
   ALICE    JOHN     KATHERINE  CINDY   GEORGE    ALICE
   ALICE    JOHN     KATHERINE  SALLY   GEORGE    MARTHA
   ALICE    JOHN     KATHERINE  GEORGE  WILLIAM   MARGARET
   ALICE    JOHN     KATHERINE  ALICE   JOHN      KATHERINE
   ALICE    JOHN     KATHERINE  MARTHA  ROBERT    CONSTANCE
   MARTHA   ROBERT   CONSTANCE  CINDY   GEORGE    ALICE
   MARTHA   ROBERT   CONSTANCE  SALLY   GEORGE    MARTHA
   MARTHA   ROBERT   CONSTANCE  GEORGE  WILLIAM   MARGARET
   MARTHA   ROBERT   CONSTANCE  ALICE   JOHN      KATHERINE
   MARTHA   ROBERT   CONSTANCE  MARTHA  ROBERT    CONSTANCE
</PRE>
   But this table has a clear problem. If I want to select a CHILD from
   this table how do I specify which CHILD column I'm talking about? It
   clearly is not enough to simply type RELATIONS.CHILD because both CHILD
   columns come from the same table. We handle the problem of ambiguous
   columns names by creating a unique alias for the table when you specify
   the join. Thus if I want to be able to select a column from this table I
   specify the join in the from clause as shown below.
<P>
 
<PRE>
   select ...
   FROM   RELATIONS X, RELATIONS Y
   where  ...
</PRE>
   This join creates the following table.
<P>
 
<PRE>
   Join of RELATIONS X, RELATIONS Y
 
   X.CHILD  X.FATHER X.MOTHER   Y.CHILD Y.FATHER  Y.MOTHER
   ---------------------------------------------------------
   CINDY    GEORGE   ALICE      CINDY   GEORGE    ALICE
   CINDY    GEORGE   ALICE      SALLY   GEORGE    MARTHA
   CINDY    GEORGE   ALICE      GEORGE  WILLIAM   MARGARET
   CINDY    GEORGE   ALICE      ALICE   JOHN      KATHERINE
   CINDY    GEORGE   ALICE      MARTHA  ROBERT    CONSTANCE
   SALLY    GEORGE   MARTHA     CINDY   GEORGE    ALICE
     .         .       .          .        .        .
     .         .       .          .        .        .
     .         .       .          .        .        .
</PRE>
   As you can see in the example FROM clause above, an alias is specified
   by following the name of a table by a second word and a comma. The
   second word is the alias for the table. Thus the alias for the first
   copy of RELATIONS is X, the alias for the second copy of RELATIONS is Y.
   There is nothing special about the aliases X and Y. We could just as
   easily have used EGG and SPAM respectively. The letters X and Y are just
   easier to type. Aliases are case insensitive. The names X.FATHER and
   x.FATHER refer to the same column.
<P>
 
   To select columns you simply use the aliased names as presented in the
   table above. Thus to find all of the grandfathers in our original table
   RELATIONS we would issue the following command
<P>
 
<PRE>
   SELECT  Y.FATHER
   FROM   RELATIONS X, RELATIONS Y
   WHERE   X.FATHER = Y.CHILD
   OR      X.MOTHER = Y.CHILD
</PRE>
   Here is how the conditions narrow down the join.
<P>
 
<PRE>
   Join of RELATIONS X, RELATIONS Y
   WHERE   X.FATHER = Y.CHILD
   OR      X.MOTHER = Y.CHILD
 
   X.CHILD  X.FATHER X.MOTHER   Y.CHILD Y.FATHER  Y.MOTHER
   ---------------------------------------------------------
   CINDY    GEORGE   ALICE      GEORGE  WILLIAM   MARGARET
   CINDY    GEORGE   ALICE      ALICE   JOHN      KATHERINE
   SALLY    GEORGE   MARTHA     GEORGE  WILLIAM   MARGARET
   SALLY    GEORGE   MARTHA     MARTHA  ROBERT    CONSTANCE
</PRE>
   We get all the names in the Y.FATHER column where the CHILD appearing in
   the Y copy of RELATIONS appears as a parent in the X copy of RELATIONS.
<P>
 
   To find every child that is a grandchild, we can simply pick out the
   children whose mothers are listed as children in the second copy of
   RELATIONS.
<P>
 
<PRE>
   SELECT X.CHILD
   FROM RELATIONS X, RELATION Y
   WHERE X.MOTHER = Y.CHILD
</PRE>
<BR><BR>
<A NAME="Using Aliases"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Using Aliases
</H3><P><BR><BR>
   Even if you do not join a table to itself, you may wish to use an alias
   for a table name. For instance, in the second example where the tables
   MUSIC and PEOPLE had a column name in column, you can use an alias as
   shown below in order to simplify the typing.
<P>
 
<PRE>
   Original Select Command Without Aliases
 
   select song
   from music, people
   where MUSIC.COMPOSER = PEOPLE.COMPOSER
   and   country  = 'IRELAND'
 
   Same Select Command but with Aliases for the Tables
 
   select song
   from music M, people P
   where M.COMPOSER = P.COMPOSER
   and   country  = 'IRELAND'
</PRE>
<BR><BR>
<A NAME="Combining More than Two Tables"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Combining More than Two Tables
</H3><P><BR><BR>
   You may join more than two tables if the need arises. The result is the
   cartesian product of the contents of the contributing tables.
<P>
 
   The syntax for specifying such a join is:
<P>
 
<PRE>
   FROM  TABLE_1 [alias_1],
         TABLE_2 [alias_2],
         ...,
         TABLE_N [alias_N]
</PRE>
   Inspekt and the E-kernel system require that N be no more than 10. As
   you might imagine, the join of many tables has the potential for
   creating an enormous table from which data will be selected. As a result
   Inspekt's speed may degrade significantly if you join many tables.
   \subsection Related Topics
<P>
 
   From Clause, Looking at Data --- SELECT
<P>
 
<BR><BR>
<A NAME="Conditional Operators"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Conditional Operators
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Normally, when you select data from an events kernels, you place
   conditions upon the various columns that will be displayed. This is done
   via conditional operators (also called relational operators).
<P>
 
   The following conditionals are supported by the E-kernel system.
<P>
 
<PRE>
   Operator       Usage in a condition
   --------       ---------------------------
   LT             column LT   expression
   LE             column LE   expression
   EQ             column EQ   expression
   GE             column GE   expression
   GT             column GT   expression
   NE             column NE   expression
   &lt;              column &lt;    expression
   &lt;=             column &lt;=   expression
   =              column =    expression
   &gt;=             column &gt;=   expression
   &gt;              column &gt;    expression
   !=             column &lt;&gt;   expression
   &lt;&gt;             column !=   expression
   LIKE           column LIKE expression
   NOT LIKE       column NOT LIKE expression
 
   BETWEEN        column BETWEEN expression
                         AND     expression
 
   NOT BETWEEN    column NOT BETWEEN expression
                         AND         expression
</PRE>
   where "column" is the name of some column and "expression" is the name
   of a column or a literal value such as 1 or "A Literal String".
<P>
 
   Conditions listed above are true if:
<P>
 
<DL><DT>
<B>
 LT or &lt;
</B><BR><BR>
<DD>
 the value column is less than the value of expression.<BR>
</DL>
<DL><DT>
<B>
 LE or &lt;=
</B><BR><BR>
<DD>
 the value of column is less than or equal to the value of expression<BR>
</DL>
<DL><DT>
<B>
 EQ or =
</B><BR><BR>
<DD>
 the value of column is equal to the value of expression. Note that for
strings, the case of characters is significant. The strings 'A' and 'a'
are not equal.<BR>
</DL>
<DL><DT>
<B>
 GE or &gt;=
</B><BR><BR>
<DD>
 the value of column is greater than or equal to the value of
expression.<BR>
</DL>
<DL><DT>
<B>
 GT or &gt;
</B><BR><BR>
<DD>
 the value of column is greater than the value of expression.<BR>
</DL>
<DL><DT>
<B>
 NE or != or &lt;&gt;
</B><BR><BR>
<DD>
 the value of column is not equal to the value of expression.<BR>
</DL>
<DL><DT>
<B>
 LIKE
</B><BR><BR>
<DD>
 the value of column matches the value of expression when expression is
interpreted as a pattern.<BR>
</DL>
<DL><DT>
<B>
 NOT LIKE
</B><BR><BR>
<DD>
 The value of column does not match the value of expression when
expression is interpreted as a pattern.<BR>
</DL>
<DL><DT>
<B>
 BETWEEN
</B><BR><BR>
<DD>
 The value of column is greater than or equal to the smaller of the two
expressions AND less than or equal to the larger of the two
expressions.<BR>
</DL>
<DL><DT>
<B>
 NOT BETWEEN The value of column is less than the smaller of the two expression OR greater than the larger of the two expression
</B><BR><BR>
<DD>
</DL>
   A WHERE clause is composed of the word "WHERE" followed by a logical
   expression made up of conditions connected by AND's, OR's and NOT's and
   grouped using parentheses.
<P>
 
<BR><BR>
<A NAME="Related Topics4"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   From Clause, Specifying Strings, Specifying Times, Where Clause
<P>
 
<BR><BR>
<A NAME="Current Settings --- SHOW"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Current Settings --- SHOW
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Inspekt can display any of it's current setting. However, these settings
   are grouped together in various groupings. To see one of these grouping
   you type
<P>
 
<PRE>
   SHOW item
</PRE>
   See the help topics below for more specific descriptions. \subsection
   Related Topics
<P>
 
   SHOW COLUMN, SHOW COMMENTS, SHOW ENVIRONMENT, SHOW FORMAT, SHOW INDEXED,
   SHOW KERNELS, SHOW PAGE, SHOW SUMMARY, Columns, Deluge Warning, Headers,
   Time Formats, Titles, Other Settings, Setting up Inspekt --- SET
<P>
 
<BR><BR>
<A NAME="Custom Formats"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Custom Formats
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   To create a custom time format for a column, enter the command:
<P>
 
<PRE>
   SET COLUMN &lt;column_name&gt; FORMAT &lt;format&gt;;
</PRE>
   where &lt;column_name&gt; is the name of the column and &lt;format&gt;
   is the custom format you desire.
<P>
 
   Custom formats work as follows. Given a time, there are associated with
   it the current year, month, day, day of year, hour, minutes, seconds,
   current julian date, current number of seconds past the epoch of J2000,
   etc. When a time is to be displayed, the custom format you have provided
   is used as a recipe for constructing the time string. Reading from left
   to right the string formatter looks for special substrings (listed
   below). Unrecognized substrings are simply copied into the output
   string. (This allows you to add any label you might like to the output
   times.) However, when a recognized substring is found, the time
   formatter determines the corresponding component of time and appends
   this to the output time string that is under construction.
<P>
 
   NOTE THAT TIME FORMATS ARE CASE SENSITIVE. To get a particular component
   of the time into the output string you must use exactly the substring
   given in the list below. For example, if you wish have the 3 letter
   abbreviation for the month appear in your output times, you must use
   "MON"; the string "mon" will simply be copied as is into any of your
   time strings.
<P>
 
   (Substrings beginning with "::" do not affect the appearance of the
   format only the time system or rounding)
<P>
 
<DL><DT>
<B>
 UTC,TDB,TDT
</B><BR><BR>
<DD>
 use the time system UTC, TDB, TDT respectively (default UTC)<BR>
</DL>
<DL><DT>
<B>
 RND, TRUNC
</B><BR><BR>
<DD>
 Round or Truncate time respectively (default truncate)<BR>
</DL>
<DL><DT>
<B>
 YYYY
</B><BR><BR>
<DD>
 year<BR>
</DL>
<DL><DT>
<B>
 MON, MM
</B><BR><BR>
<DD>
 3 letter abbreviation, 2 digit number for month resp.<BR>
</DL>
<DL><DT>
<B>
 DD, DOY
</B><BR><BR>
<DD>
 day of month, day of year respectively<BR>
</DL>
<DL><DT>
<B>
 WKD
</B><BR><BR>
<DD>
 3 letter abbreviation for day of week<BR>
</DL>
<DL><DT>
<B>
 HR, MN, SC
</B><BR><BR>
<DD>
 hour, minutes, seconds respectively<BR>
</DL>
<DL><DT>
<B>
 JD,SP1950, SP2000
</B><BR><BR>
<DD>
 Julian date, seconds past 1950 or 2000 respectively<BR>
</DL>
<DL><DT>
<B>
 Decimals
</B><BR><BR>
<DD>
 when the characters<BR>
</DL>
<PRE>
                             ###
</PRE>
<DL><DT>
<DD>
 follow a decimal point, they indicate the number of decimal places to
use in the representation of the preceding numeric component. For
example<BR>
</DL>
<PRE>
                             'SC.###'
</PRE>
<DL><DT>
<DD>
 indicates that the seconds component of a time should be presented with
3 decimal points.<BR>
</DL>
<BR><BR>
<A NAME="Related Topics5"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Example Time Formats
<P>
 
<BR><BR>
<A NAME="Default Floating Format"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Default Floating Format
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When printing a double precision number in a report, Inspekt first
   examines the column attributes to determine if you have specified a
   particular format for that column. If you have that format is used to
   create the text that is presented in the report. If you have not
   specified a particular format, Inspekt looks up the "default floating
   format" and uses this to create the text to be used in the report. You
   may adjust the default floating format. To do this issue the command
<P>
 
<PRE>
   SET DEFAULT FLOATING FORMAT format;
</PRE>
   where "format" is the format you'd like Inspekt to use when you have not
   specified a particular format for a column.
<P>
 
   If you've specified a format for a double precision column, and would
   like to return to using the default floating format issue the command
<P>
 
<PRE>
   SET COLUMN column_name FORMAT DEFAULT;
</PRE>
   Until you change the format for the specified column again, the format
   used when presenting its values in a report will be the default floating
   format.
<P>
 
<BR><BR>
<A NAME="Related Topics6"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Numeric Formats, Default Integer Format, Default Time Format, SHOW
   FORMAT
<P>
 
<BR><BR>
<A NAME="Default Integer Format"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Default Integer Format
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When printing an integer in a report, Inspekt first examines the column
   attributes to determine if you have specified a particular format for
   that column. If you have that format is used to create the text that is
   presented in the report. If you have not specified a particular format,
   Inspekt looks up the "default integer format" and uses this to create
   text to be used in the report. You may adjust the default integer
   format. To do this issue the command
<P>
 
<PRE>
   SET DEFAULT INTEGER FORMAT format;
</PRE>
   where "format" is the format you'd like Inspekt to use when you have not
   specified a particular format for an integer column.
<P>
 
   If you've specified a format for an integer column, and would like to
   return to using the default integer format issue the command
<P>
 
<PRE>
   SET COLUMN column_name FORMAT DEFAULT;
</PRE>
   Until you change the format for the specified column again, the format
   used when presenting its values in a report will be the default integer
   format.
<P>
 
<BR><BR>
<A NAME="Related Topics7"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Numeric Formats, Default Floating Format, Default Time Format, SHOW
   FORMAT
<P>
 
<BR><BR>
<A NAME="Default Time Format"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Default Time Format
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When printing a time in a report, Inspekt first examines the column
   attributes to determine if you have specified a particular format for
   that column. If you have that format is used to create the text that is
   presented in the report. If you have not specified a particular format,
   Inspekt looks up the "default time format" and uses this to create text
   to be used in the report. You may adjust the default time format. To do
   this issue the command
<P>
 
<PRE>
   SET DEFAULT TIME FORMAT format;
</PRE>
   where "format" is the format you'd like Inspekt to use when you have not
   specified a particular format for a column.
<P>
 
   If you've specified a format for a time column, and would like to return
   to using the default time format issue the command
<P>
 
<PRE>
   SET COLUMN column_name FORMAT DEFAULT;
</PRE>
   Until you change the format for the specified column again, the format
   used when presenting its values in a report will be the default time
   format.
<P>
 
<BR><BR>
<A NAME="Related Topics8"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Custom Formats, Default Floating Format, Default Integer Format, SHOW
   FORMAT
<P>
 
<BR><BR>
<A NAME="Deluge Warning"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Deluge Warning
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   To see the current data-deluge warning level type the command
<P>
 
<PRE>
   SHOW FORMAT
</PRE>
   To set the deluge warning level, type the command.
<P>
 
<PRE>
   SET DELUGE WARNING integer
</PRE>
   If you take no action the warning level has value 100.
<P>
 
<BR><BR>
<A NAME="Related Topics9"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Getting Too Much Data, Sampling Data
<P>
 
<BR><BR>
<A NAME="Display Area"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Display Area
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   The area of the terminal or terminal window where reports are displayed
   is called the output page. Reports may span several output pages.
   Inspekt allows you to adjust the shape of the output page and to control
   the titles and headers that appear on the page. The commands that allow
   you to manipulate the output page are shown below.
<P>
 
<PRE>
      SET PAGE WIDTH number
      SET PAGE HEIGHT number
      SET PAGE TITLE title
      SET TITLE JUSTIFICATION justification
      SET TITLE FREQUENCY frequency
      SET HEADER FREQUENCY frequency
</PRE>
   The output page is described in terms of printable fixed size
   characters. By default it is 80 characters wide and 24 characters tall.
   The output page is a subset of a page region that is between 40 and 132
   characters wide and at least 22 characters tall. (The maximum page
   height allowed is the maximum positive integer that your computer
   supports)
<P>
 
   The page width is used to determine how much text can fit across your
   terminal window. The page height is used to determine how many lines of
   text can be written before displaying a page title or report header.
<P>
 
<BR><BR>
<A NAME="Related Topics10"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Reports, SET TIME, SET HEADER, SET PAGE
<P>
 
   |endliteral
<P>
 
<BR><BR>
<A NAME="Echoing Translated Commands"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Echoing Translated Commands
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Although symbols can be a big help when used well, they can also
   interfere with what you think you've typed. Usually you discover this
   problem as the result of an error message.
<P>
 
   You may want to see how Inspekt translated what you typed before it gets
   around to acting on the command. To do this you can "turn on" command
   echoing. Do this by typing
<P>
 
<PRE>
   ECHO
</PRE>
   Having issued this command, when a new command is issued that contains
   symbols, Inspekt will "echo" the translated command so that you can see
   how Inspekt has interpreted your command.
<P>
 
   To disable the echoing of commands type:
<P>
 
<PRE>
   NO ECHO
</PRE>
   You can see the current status of command echoing by issuing a show
   environment command.
<P>
 
<PRE>
   SHOW ENVIRONMENT
</PRE>
<BR><BR>
<A NAME="Editing Commands"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Editing Commands
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Inspekt maintains a "stack" of the twenty most recently entered
   commands. Each new command is placed on "top" of the other commands.
   Once a command has twenty or more commands on top of it, it is lost and
   can not be retrieved.
<P>
 
   Commands in the stack are numbered from 1 to 20. The most recently
   issued command (the one on top) is number 1. The command issued just
   prior to number 1, is number 2, and so on.
<P>
 
   You can manipulate this stack with the commands below. Most "stack"
   manipulation commands require that you specify a particular command. You
   can do this by specifying the number of the command (the number provide
   by RECALL) or by specifying a pattern. If you specify a command via a
   number, the number must be between 1 and 20. If you specify the command
   via a pattern, you are specifying the last command whose first line
   matches the pattern. As a convenience, the wild card '*' is
   automatically appended to the specification pattern. You can not
   suppress the appended wild card.
<P>
 
<DL><DT>
<B>
 RECALL
</B><BR><BR>
<DD>
 displays the commands in the reverse order from the way you have
entered them. The commands are numbered so that you may easily refer to
them. The stack is left unchanged.<BR>
</DL>
<DL><DT>
<B>
 RECALL number \crcr RECALL pattern
</B><BR><BR>
<DD>
 displays a specific command. The stack is left unchanged.<BR>
</DL>
<DL><DT>
<B>
 DO number<BR> DO pattern
</B><BR><BR>
<DD>
 re-executes the command specified. The re-executed command is placed on
the top of the command stack.<BR>
</DL>
<DL><DT>
<B>
 EDIT number<BR> EDIT pattern
</B><BR><BR>
<DD>
 invokes your system editor and allows you to use the editor to modify
the command. When you exit the editor, the new command is executed and
placed on the top of the command stack.<BR>
</DL>
<BR><BR>
<A NAME="Related Topics11"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Pattern Matching, Setting The Editor
<P>
 
<BR><BR>
<A NAME="Environment Variables"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Environment Variables
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Inspekt recognizes two environment variables: LEAPSECONDS and SCLK. If
   you want to make them available to Inspekt, you should create one or
   both of them prior to running Inspekt.
<P>
 
<DL><DT>
<B>
 LEAPSECONDS
</B><BR><BR>
<DD>
 should point to a SPICE leapseconds kernel.<BR>
</DL>
<DL><DT>
<B>
 SCLK
</B><BR><BR>
<DD>
 should point to a SPICE Spacecraft Clock kernel.<BR>
</DL>
   Inspekt looks for these environment variables at program initialization.
   If they are present, Inspekt will load the kernels pointed to by the
   environment variables. This is the only time these variables can be used
   by Inspekt. You may not use them in a LOAD command.
<P>
 
   If you should decide to use these environment variables make sure that
   they evaluate to the full path name of the kernels. You may set these
   variables with C-shell command "setenv"
<P>
 
<PRE>
   setenv LEAPSECONDS (full path of leapseconds kernel)
   setenv SCLK        (full path of spacecraft clock kernel)
</PRE>
   In DCL you use logical variables instead of environment variables. You
   set the logical variables using the define command.
<P>
 
<PRE>
   DEFIND LEAPSECONDS DISK:[DIR.ECT.ORY]leap_file.ker
   DEFINE SCLK        DISK:[DIR.ECT.ORY]sclk_file.ker
</PRE>
<BR><BR>
<A NAME="Errors"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Errors
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Every now and then, you will type a command that Inspekt cannot process.
   There are several causes of such errors: typos, misunderstanding of
   commands syntax, or inadequate preparation of Inspekt's environment.
   Inspekt attempts to diagnose errors and provides two levels of error
   diagnosis. All error diagnostics are written to Inspekt's log file.
<P>
 
   When an error is detected, Inspekt will display a message and then
   prompt for a new command. If the error message does not seem to explain
   what went wrong, you can get the second level of error diagnosis by
   entering the command "?;". If second level of error diagnosis is not
   available, you will get a message stating that there is no more
   information available. If a second level is available, the diagnosis
   will be displayed. This second level will usually list the chain of
   subroutine calls that led to the error diagnosis and other information.
   If you can't determine the cause of the error, send a description of
   what you were attempting to do along with the Inspekt.log file to:
<P>
 
<PRE>
   btaber@spice.jpl.nasa.gov
</PRE>
   and I will do what I can to help out.
<P>
 
<PRE>
   -Bill Taber
</PRE>
<BR><BR>
<A NAME="Related Topics12"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Typing Commands
<P>
 
<BR><BR>
<A NAME="Example Time Formats"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Example Time Formats
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Below is a collection of sample time formats and the time strings that
   would be formed for noon on the fifteenth of February 1993.
<P>
 
<PRE>
   Format:  YYYY-MON-DD WKD HR:MN:SC
   Result:  1993-FEB-15 MON 12:00:00
 
   Format:  Day of year DDD, MON-DD YYYY HR:MN:SC.####
   Result:  Day of year 046, FEB-15 1993 12:00:00.0000
 
   Format:  YYYY-DDD.### ::RND
   Result:  1993-046.500
</PRE>
<BR><BR>
<A NAME="Related Topics13"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Time Formats, Custom Formats
<P>
 
<BR><BR>
<A NAME="Example Where Clause"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Example Where Clause
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   The WHERE clause in the SELECT command below narrows down a selection to
   those events that occurred later than 1 Jan 1993 but before 1 MAR 1993.
   It further restricts the selection to those events that have "PLATFORM"
   occurring in a substring in the SUBSYSTEM column of the event.
<P>
 
<PRE>
   select time event_type subsystem notes
   from  events
   WHERE TIME GT "1 JAN 1993"
     AND TIME LT "1 MAR 1993"
     AND SUBSYSTEM LIKE "*PLATFORM*";
</PRE>
   Note that the times used in the TIME condition and the pattern used in
   the SUBSYSTEM condition must match is enclosed in double (") or single
   (') quotes.
<P>
 
<BR><BR>
<A NAME="Flagged Format"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Flagged Format
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Flagged formats are presented as shown here
<P>
 
<PRE>
   First Column : Value of column for first event
   Second Column: Value of the second column with
                  the output wrapped if it will
                  not fit on a single line of text.
   Third Column : Value of the third column
                  possibly wrapped in an uneven
                  fashion due to
                  the means of specifying an event.
 
   First Column : Value of this for second event
         ...            ...
</PRE>
   There are two forms of flagged format. PRESERVED and un-PRESERVED
   (default). If a format is a preserved, each component of a column is
   begun on a new line of the report. Otherwise it is considered to be
   simply FLAGGED format. Note a blank line is inserted between consecutive
   events in the output. \subsection Related Topics
<P>
 
   Reports
<P>
 
<BR><BR>
<A NAME="From Clause"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> From Clause
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   An E-kernel may contain many different tables. Moreover, different
   tables may have columns having the same name. For this reason when you
   select items to be displayed in a report via a SELECT or SAMPLE ...
   SELECT statement you must specify which table the report is to be drawn
   from. You do this via the FROM clause of the SELECT statement
<P>
 
<PRE>
   select  ...
   FROM    TABLE_1 [alias_1]
        [, TABLE_2 [alias_2] ...]
   where   ...
   oder by ...
</PRE>
   The simplest commands involve only one table. In such cases there is
   usually no need to supply an alias for the table specified in the FROM
   clause. \subsection Related Topics
<P>
 
   Combining Tables, Looking at Data --- SELECT
<P>
 
<BR><BR>
<A NAME="Getting Too Much Data"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Getting Too Much Data
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   We anticipate that E-kernels may become quite large. As a result the
   number of events that satisfy some matching criteria given in a SELECT
   command might be very large. Since Inspekt does not yet support a
   UNIX-like "more" function and does not allow you to interrupt some task
   (via a key sequence such as CTRL-C), Inspekt has a user adjustable
   DATA-DELUGE WARNING level. Reports will be generated automatically in
   response to a SELECT command only if the number of matching events is
   less than the data-deluge warning level. If the number of matching
   events is greater than this level, you will be notified and given the
   option of producing the report, viewing a subsample of the report, or
   cancelling the report.
<P>
 
   To set the deluge warning level, type the command.
<P>
 
<PRE>
      SET DELUGE WARNING integer
</PRE>
   If you take no action the warning level has value 100.
<P>
 
   To see the current data-deluge warning level type the command
<P>
 
<PRE>
   SHOW FORMAT
</PRE>
<BR><BR>
<A NAME="Related Topics14"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Sampling Data, SHOW FORMAT
<P>
 
<BR><BR>
<A NAME="Headers"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Headers
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   The only attribute that you can set that globally affects headers is the
   header frequency. To see the current frequency type the command
<P>
 
<PRE>
   SHOW PAGE;
</PRE>
<BR><BR>
<A NAME="Kernels --- LOAD"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Kernels --- LOAD
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   SPICE data is stored in data files called kernels. To make the data in
   these kernels available for retrieval and manipulation by Inspekt, you
   need to "load" the kernels. When you load a kernel, Inspekt opens the
   file, reads the file, and stores some (or all) of its contents in
   Inspekt's memory.
<P>
 
   E-kernels can be "unloaded." When an E-kernel is unloaded, Inspekt
   "forgets" about the existence of the kernel. Data in the kernel can not
   be retrieved or manipulated without first re-loading it.
<P>
 
   To load or unload an E-kernel, type
<P>
 
<PRE>
   LOAD EK (filename of E-kernel)
   UNLOAD  (filename of previously loaded E-kernel).
</PRE>
   The filename used in the UNLOAD command must be the same as the filename
   used to load it.
<P>
 
   Two other files may be loaded: a leapseconds kernel and an SCLK kernel.
   These are loaded using the commands:
<P>
 
<PRE>
   LOAD LEAPSECONDS (filename of leapseconds kernel)
   LOAD SCLK KERNEL (filename of SCLK kernel)
</PRE>
   You can avoid having to load leapseconds or SCLK kernels by setting up
   the environment variables SCLK and LEAPSECONDS to point to the
   corresponding kernel prior to starting Inspekt.
<P>
 
   Leapsecond and SCLK kernels cannot be unloaded. However, you can load a
   different leapseconds or SCLK kernel. When a new SLCK or leapseconds
   kernel is loaded Inspekt behaves as if you had never loaded the previous
   SCLK or leapseconds kernel. Only the data in the freshly loaded kernel
   will be used by Inspekt.
<P>
 
   There are two commands for determining what kernels have been loaded.
<P>
 
<PRE>
   SHOW KERNELS;
</PRE>
   displays which E-kernels have been loaded
<P>
 
<PRE>
   SHOW ENVIRONMENT
</PRE>
   displays which leapseconds and SCLK kernels (if any) have been loaded
   along with other information about the current Inspekt settings.
   \subsection Related Topics
<P>
 
   Environment Variables
<P>
 
<BR><BR>
<A NAME="Limits"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Limits
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Listed below are the limits for various aspects of Inspekt.
<P>
 
<DL><DT>
<B>
 Loaded E-kernels
</B><BR><BR>
<DD>
 a maximum of 20 E-kernels may be loaded at once.<BR>
</DL>
<DL><DT>
<B>
 Total number of columns
</B><BR><BR>
<DD>
 a maximum of 500 columns may be present in all of the loaded kernels<BR>
</DL>
<DL><DT>
<B>
 Page Width
</B><BR><BR>
<DD>
 the page must be at least 40 characters wide and no more than 132
characters wide.<BR>
</DL>
<DL><DT>
<B>
 Column width
</B><BR><BR>
<DD>
 a column must be at least 8 characters wide and no more than 80
characters wide.<BR>
</DL>
<DL><DT>
<B>
 Command Size
</B><BR><BR>
<DD>
 A command can contain no more than 1760 character (it should fit on one
24 by 80 character screen).<BR>
</DL>
<DL><DT>
<B>
 Events per Report
</B><BR><BR>
<DD>
 A default limit of 100 rows will be presented in any report. You can
override this limit with the SET DELUGE command or at the time a report
is ready for output.<BR>
</DL>
<BR><BR>
<A NAME="Looking at Data --- SELECT"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Looking at Data --- SELECT
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   To view events in a report, you need to issue a "SELECT" command. The
   form of this command is shown below ("WHERE" and "ORDER BY" clauses are
   optional).
<P>
 
<PRE>
   SELECT a comma delimited
          list of unambiguous
          column names
   FROM   a comma delimited
          list of tables-alias pairs
   WHERE    condition_1
      AND/OR condition_2
      ...
      AND/OR condition_n
   ORDER BY a comma delimited
            list of unambiguous
            column names
</PRE>
   All but one of the conditions in the "WHERE" clause have the form:
<P>
 
<PRE>
   [NOT] column &lt;relation&gt; value
</PRE>
   If the column is a character or time column, the value must be enclosed
   in either single (') or double (") quotes. Allowed relations are EQ NE
   LT LE GT GE and LIKE (used for pattern matching).
<P>
 
<BR><BR>
<A NAME="Related Topics15"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Column and Table Abbreviations, Select Clause, From Clause, Where
   Clause, Order By, Combining Tables, Reports, Getting Too Much Data
<P>
 
<BR><BR>
<A NAME="Making Help Wait"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Making Help Wait
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When you select a help topic for which there is some text that should be
   displayed, the help system begins sending this text to your display. If
   there is a lot of text, some of it may scroll by before you have a
   chance to read it. There are two ways to deal with this.
<P>
 
<UL>
<TT>1.</TT> You can hit CTRL-S on your keypad to cause output to your display to be
temporarily disabled. Hit CTRL-Q to restart the output. This works on most
terminals and terminal emulators.
<BR><BR></UL>
<UL>
<TT>2.</TT> You can tell Inspekt to wait once it finishes displaying a page full of
text.
<BR><BR></UL>
   To do this at the Inspekt prompt type:
<P>
 
<PRE>
   Inspekt&gt; SET HELP WAIT;
</PRE>
   The Inspekt help system will now pause after each page of text it
   displays and wait for you to hit a carriage return before it displays
   the next page or related topics menu.
<P>
 
   To return to the original help system behaviour, type the command
<P>
 
<PRE>
   Inspekt&gt; SET HELP NO WAIT;
</PRE>
   Note that the size of a page is also under your control. You may set the
   number of lines that will fit on a page by using the command "SET PAGE
   HEIGHT". This command is described in the "SET PAGE ..." help topic.
<P>
 
<BR><BR>
<A NAME="Related Topics16"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   SET PAGE
<P>
 
<BR><BR>
<A NAME="Numeric Formats"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Numeric Formats
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   A numeric format is specified by creating a picture of the format. For
   example to specify that a number should start with 3 digits and be
   displayed to 3 decimal places use a picture such as this:
<P>
 
<PRE>
   ###.###
</PRE>
   If the first character of the picture is a minus sign, the first
   character in the output string will be a blank if the number is
   non-negative, a minus sign if the number is negative.
<P>
 
   If the first character of the picture is a plus sign, the first
   character of the output string will be a plus if the number is positive,
   a blank if the number is zero, and a minus sign if the number is
   negative.
<P>
 
   If the first character of the string is NOT a sign (plus or minus) the
   first character of the output string will be a minus sign if the number
   is negative and will be the first character of the integer part of the
   number otherwise.
<P>
 
   The integer portion of STRING will contain at least as many characters
   as appear before the decimal point (or last character if there is no
   decimal point) but after a leading + or -. There will ALWAYS be at least
   one digit output in integer portion of STRING.
<P>
 
   If the picture begins with a any of the following
<P>
 
<PRE>
      '+0', '-0', or '0'
</PRE>
   it is said to have a leading zero. If a picture has a leading zero and
   the integer portion is not large enough to fill up the integer space
   specified by the picture, the output will be zero padded from the sign
   (if one is required) up to the first character of the integer part of
   the number.
<P>
 
   If picture does NOT have a leading zero and the integer portion is not
   large enough to fill up the space specified by the picture, output will
   be blank padded between the sign (if one is required and the first
   character of the integer part of the number.
<P>
 
   If a decimal point ( '.' ) is present in the picture it will be present
   following the integer portion of output. Moreover, the decimal portion
   of the output will contain the same number of digits as there are
   non-blank characters following the decimal point in the picture.
   However, if the picture contains more than 14 characters following the
   decimal point, the characters in output that follow the 14 position to
   the right of the decimal point will be zeros.
<P>
 
<BR><BR>
<A NAME="Order By"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Order By
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   You may control the order in which events are reported by a SELECT
   command through use of the "ORDER BY" clause that is an optional part of
   all SELECT commands. The default ordering is by the TIME column that is
   present in every E-kernel. To order your output based upon some other
   column issue the SELECT command with the clause
<P>
 
<PRE>
   ORDER BY column(s) of choice
</PRE>
   as part of your command. Column names should be separated by commas (,).
   Note that the "ORDER BY" clause works faster with indexed columns. To
   see which columns are indexed you can use any of the commands:
<P>
 
<PRE>
   SHOW INDEXES
   SHOW KERNELS
   SHOW SUMMARY
</PRE>
<BR><BR>
<A NAME="Related Topics17"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Looking at Data --- SELECT
<P>
 
<BR><BR>
<A NAME="Pattern Matching"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Pattern Matching
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   It is often easier to describe a set of character by specifying some
   common pattern shared by all of the strings of interest. For this reason
   you can use a LIKE relation in the WHERE clause of a SELECT command. You
   specify a like condition as shown below:
<P>
 
<PRE>
   column_name LIKE "pattern"
</PRE>
   where "pattern" is a pattern that the column must match for the
   LIKE-condition to be satisfied. Note that the pattern must be enclosed
   in quotes ("). There are two special characters that may appear in a
   pattern. The asterisk '*' matches any substring. The percent mark '%'
   matches any character. If a pattern does not begin/end with the
   asterisk, the column value must begin/end with the pattern character in
   order to match the pattern. pattern matching is case insensitive.
<P>
 
<PRE>
   Examples:  SPECIAL          matches S*C%%L
              SPECIAL does not match   S*C%%L%
              SPECIAL          matches %PE%%AL
              SPECIAL          matches S*L
</PRE>
<BR><BR>
<A NAME="Patterns"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Patterns
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Patterns are sequences of characters that are used to select a word or
   phrase from some list of words or phrases. The pattern begins at the
   first non-blank character in the character sequence. The pattern ends at
   the last non-blank character of the sequence.
<P>
 
   There are two special characters that may appear in a pattern they are
   '*' the substring "wild card" and '%' the character "wild card".
<P>
 
   Patterns are useful only when they are used to select matching strings.
<P>
 
   Pattern matches in Inspekt are case insensitive: 'a' matches both 'a'
   and 'A'. Upper and lower case letters are said to be equivalent.
<P>
 
   If a pattern does not begin with a wild card, a matching string must
   begin with the a character that is equivalent to the beginning character
   of the pattern. If a pattern does not end with a wild card, a matching
   string must end with a character that is equivalent to the ending
   character of the pattern.
<P>
 
<BR><BR>
<A NAME="Query"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Query
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   The word query is used in two ways in Inspekt.
<P>
 
<UL>
<TT>1.</TT> A query is a SELECT command issued to Inspekt to search loaded E-kernels
for data that satisfies a user specified selection criteria
<BR><BR></UL>
<UL>
<TT>2.</TT> A query is a word in a command, or symbol that ends in a question mark.
When Inspekt encounters such a word in a command, it prompts the user for a
value to replace the "query"
<BR><BR></UL>
<UL>
<TT>&#32;&#32;</TT> For example suppose you enter the command
<BR><BR></UL>
<PRE>
            Inspekt&gt; SHOW COLUMN NAME?;
</PRE>
<UL>
<TT>&#32;&#32;</TT> Inspekt will ask you to supply a value for NAME? and then continue acting
upon the resulting command. Normally you will not type queries directly
when issuing a command. Instead, you will define symbols that contain
queries or place queries in commands that are collected in Inspekt
procedure files.
<BR><BR></UL>
<BR><BR>
<A NAME="Reports"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Reports
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   After you issue a SELECT command to Inspekt, the program presents a
   display of the items that match the selection criteria. The items
   displayed together with the method in which they are displayed is called
   a "report".
<P>
 
   A report has several attributes that are user adjustable.
<P>
 
   Reports are presented in a region that models a physical page as you
   find in a loose leaf binder. You may adjust the height and width of
   these pages.
<P>
 
   A report is presented in a particular format. There are three basic
   formats: tabular, flagged and verbatim. You may select the format you
   prefer for reports the program creates. Tabular formats are usually the
   easiest to read. However, if events have a large number of attributes
   and you want to see many of these attributes, you may find the flagged
   format better suited to your needs. Verbatim format allows you to see
   most directly the actual contents of an event without any of Inspekt's
   formatting tools modifying line breaks in the original data. However,
   this format is difficult to read and suitable only when you need to see
   directly how a particular event was stored in the E-kernel.
<P>
 
   Every report has a title. You can remove the title, change it and alter
   the frequency with which it is displayed (only at the beginning of the
   report, on every page, or every n'th page). You can also control whether
   the title is left justified, right justified or centered on the report
   page.
<P>
 
   Reports in tabular format, have a header as well as a title. The header
   names the various columns that appear in the report. As with the report
   title you can adjust the frequency with which the header is displayed in
   the report.
<P>
 
<BR><BR>
<A NAME="Related Topics18"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Tabular Format, Flagged Format, Verbatim Format, SET FORMAT, SET HEADER,
   SET TITLE, SET PAGE
<P>
 
<BR><BR>
<A NAME="Sampling Data"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Sampling Data
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When you first open an E-kernel, it is often not clear what range of
   events are present in the kernel. In such situations, simply selecting
   events may result in much more data that you can easily view. For this
   reason you may preface your selection command with a "SAMPLE" clause. By
   doing so, you can view a reasonable subset of the events that match your
   selection criteria. There are several forms of the SAMPLE clause.
   However, all sample commands are formed the same way: type the SAMPLE
   clause and follow it by the SELECT statement you would issue if you
   wanted to view all of the matching events of a selection.
<P>
 
   The SAMPLE clauses that can prefixed to a SELECT command are shown
   below:
<P>
 
<PRE>
   SAMPLE number
   SAMPLE FIRST number
   SAMPLE LAST  number
   SAMPLE number FROM  percentile TO percentile
   SAMPLE number UP TO       percentile [EVERY number]
   SAMPLE number STARTING AT percentile [EVERY number]
   SAMPLE number CENTER   AT percentile [EVERY number]
</PRE>
   The first "number" in each clause is the number of samples to extract
   from a selection. Percentiles must be integers from 0 to 100. The 0th
   percentile corresponds to the first event of a selection; the 100th
   percentile to the last event. In those clauses with an optional "EVERY"
   subclause, the "EVERY-number" refers to how many events to skip between
   displayed events. If not supplied the "EVERY-number" value is assumed to
   be one (1). \subsection Related Topics
<P>
 
   Looking at Data --- SELECT
<P>
 
<BR><BR>
<A NAME="Saving Work --- SAVE TO"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Saving Work --- SAVE TO
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   To save output that is printed on your terminal (or in your terminal
   window) issue the command:
<P>
 
<PRE>
   SAVE TO filename;
</PRE>
   All subsequent screen output will be saved the file specified in the
   command. To stop saving to the SAVE file, issue the command
<P>
 
<PRE>
   DISCARD;
</PRE>
   You may SAVE and DISCARD output as frequently as you wish. Moreover, a
   different file may be used with each SAVE command. However, to begin
   saving output to a new file you must first issue a DISCARD command. If
   you use the same filename you may (depending upon your system) overwrite
   the previous file.
<P>
 
   Regardless of whether you save any screen output, Inspekt automatically
   saves every command you type at the "Inspekt&gt;" prompt. These commands
   are collected in the Inspekt Log File. It has a name of the form
   "nspXXXXX.log" where each 'X' is a decimal digit. In addition to
   commands you type, the text of any error message that Inspekt produces
   are recorded in the log file.
<P>
 
   The log file is a crucial aid in determining why Inspekt sometimes
   behaves in unexpected ways. Each log file is in fact an Inspekt
   procedure that you can execute to exactly the sequence of commands you
   entered in some previous Inspekt work session. If you have a problem
   with Inspekt, and need our assistance, be sure to save the log file so
   that we can duplicate your problems.
<P>
 
<BR><BR>
<A NAME="Select Clause"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Select Clause
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When you issue a select command, you are telling Inspekt to find rows
   from a table (or join of tables) as specified by a FROM clause. The rows
   match some criterion specified in a "WHERE" clause. (If no "WHERE"
   clause is specified, all events are considered to be of interest.) To
   request columns in a report you should type the first portion of the
   SELECT command as shown below.
<P>
 
<PRE>
   SELECT col_1, col_2, ... , col_n
   FROM table ...
   WHERE condition ...
   ORDER BY ...
</PRE>
   Note that commas (,) are required between column names. If you select
   rows from a single table (i.e. the FROM clause lists a single table) you
   can just use the column names from that table. However, if you select
   columns from a "join" of two or more tables and two or more of the
   tables possess the column you want to see you need to make sure you tell
   Inspekt which table the column belongs to. To do this you attach the
   name of the table (or an alias for that table) to the front of the
   column name as in
<P>
 
<PRE>
      table.column
   or
      alias.column
</PRE>
   The columns will be displayed in the report in the same order as you
   list them in the select clause.
<P>
 
<BR><BR>
<A NAME="Related Topics19"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Looking at Data --- SELECT
<P>
 
<BR><BR>
<A NAME="SET COLUMN ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SET COLUMN ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   To adjust the display attributes of a column use the SET COLUMN command.
   You may adjust the width of a column, the heading that will appear in
   tabular reports, whether or not columns will be left or right justified
   in reports, and the format of the column for time and numeric columns.
   The syntax of the SET COLUMN command is:
<P>
 
<PRE>
   SET COLUMN @name
    (1:1){ WIDTH @int(8:80)
         | FORMAT    (1:)@word
         | HEADING   (1:)@word
         | JUSTIFICATION RIGHT
         | JUSTIFICATION LEFT }
</PRE>
   NOTE: If you modify the format of a numeric or time column, the width of
   the column is automatically adjusted to match the width of the new
   format. You must re-adjust the width if you want it to be something
   other than the width of the format. \subsection Related Topics
<P>
 
   Time Formats, Numeric Formats, SHOW COLUMN
<P>
 
<BR><BR>
<A NAME="SET FORMAT ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SET FORMAT ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Inspekt supports 3 basic report formats: TABULAR, FLAGGED and VERBATIM.
   These are set using the SET FORMAT command. The syntax for this command
   is:
<P>
 
<PRE>
   SET FORMAT (0:1){ MARKED | SPACED }
      TABULAR (0:1){ PRESERVED }
 
   SET FORMAT FLAGGED (0:1){ PRESERVED }
 
   SET FORMAT VERBATIM
</PRE>
   TABULAR reports show each event as a row of a table with the various
   event attributes appearing in fixed columns.
<P>
 
   FLAGGED reports show events as a vertical list of name-value paragraphs
   with each complete event separated from the next by a blank line.
<P>
 
   VERBATIM reports list events as a vertical list as well. However the
   column name is listed on one line and its value on the next line(s).
   This presents the components of each column without line breaks.
<P>
 
<BR><BR>
<A NAME="Related Topics20"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Reports, SET FORMAT MARK, SHOW FORMAT
<P>
 
<BR><BR>
<A NAME="SET FORMAT MARK ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SET FORMAT MARK ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When you use MARKED TABULAR formats for reports, Inspekt places the
   character "&gt;" in the leftmost column of the report. You can modify
   this FORMAT MARK by issuing a SET FORMAT MARK command.
<P>
 
   Decide what character you want to appear in the leftmost column
   (remember you cannot use the semi-colon ";"). For the purpose of an
   example lets use "=". Then issue the command:
<P>
 
<PRE>
   SET FORMAT MARK =;
</PRE>
   From this point forward MARKED TABULAR reports will place the character
   "=" in the left most column of reports.
<P>
 
<BR><BR>
<A NAME="SET HEADER ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SET HEADER ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When Inspekt produces a report as the result of a SELECT command, and
   the reporting format is some form of tabular format, Inspekt can place a
   header at the beginning of the displayed output. This header displays
   the names of the various columns that appear in the report. (If a column
   has an alias, the alias will be used instead of the column name.)
<P>
 
   You can control how often these items are placed in your report by
   issuing a SET HEADER FREQUENCY command. The syntax for this is:
<P>
 
<PRE>
   SET HEADER FREQUENCY (1:1){ 0
                             | 1ST
                             | FIRST
                             | ALL
                             | EVERY @int(1:)
                             }
</PRE>
   The values mean respectively: on none of the pages; on the first page
   only, on every page, and on the first page and every nth page following
   the first page.
<P>
 
<BR><BR>
<A NAME="Related Topics21"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   SET TITLE
<P>
 
<BR><BR>
<A NAME="SET PAGE ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SET PAGE ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Reports written by Inspekt are modelled as if they were being written to
   a page of fixed height and width. This is convenient if you plan to save
   the output of a file (using the SAVE TO command) and then print the
   resulting file. Moreover, if you have a long report, it allows you to
   have header and title information appear on your screen at regular
   intervals.
<P>
 
   The default height and width of this page are 20 and 80 characters
   respectively. To adjust these use the following commands.
<P>
 
<PRE>
   SET PAGE HEIGHT @int(20:)
   SET PAGE WIDTH  @int(40:132)
</PRE>
   You may also set the title that appears on reports with the command
<P>
 
<PRE>
   SET PAGE TITLE (1:)@word
</PRE>
   Use the title "NONE" if you want no title to appear on report pages.
<P>
 
<BR><BR>
<A NAME="Related Topics22"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   SHOW PAGE
<P>
 
<BR><BR>
<A NAME="SET TIME ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SET TIME ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   There are two commands available for adjusting the format of time
   strings when they are output in reports. They are:
<P>
 
<PRE>
   SET COLUMN column_name FORMAT format;
 
   SET DEFAULT TIME FORMAT format;
</PRE>
<BR><BR>
<A NAME="Related Topics23"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Time Formats, Default Time Format, Custom Formats
<P>
 
<BR><BR>
<A NAME="SET TITLE ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SET TITLE ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When Inspekt produces a report as the result of a SELECT command, it can
   place a title and a header on the report. You set a report title that
   appears on pages of a report by issuing the command:
<P>
 
<PRE>
   SET PAGE TITLE title
</PRE>
   Note that the TITLE is an attribute of the display page. Whenever, a
   report is displayed in which a title is allowed, the title you've set
   with the SET PAGE TITLE command will be the title used.
<P>
 
   You may also control the placement of the report title using the
   command:
<P>
 
<PRE>
   SET TITLE JUSTIFICATION (1:1){ LEFT | CENTER | RIGHT }
</PRE>
   You can control how often the title are placed in your report by issuing
   a SET TITLE/HEADER FREQUENCY command. The syntax for this is:
<P>
 
<PRE>
   SET TITLE  FREQUENCY (1:1){ 0
                             | 1ST
                             | FIRST
                             | ALL
                             | EVERY @int(1:)
                             }
</PRE>
   The values mean respectively: on none of the pages; on the first page
   only; on every page, and on the first page and every nth page following
   the first page. (See SET PAGE ...for a description of the output page ).
<P>
 
<BR><BR>
<A NAME="Related Topics24"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   SET HEADER
<P>
 
<BR><BR>
<A NAME="Setting The Editor"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Setting The Editor
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When you type
<P>
 
<PRE>
   EDIT command
</PRE>
   Inspekt writes the specified command to a file, starts up some text
   editor on your system and loads the file into the editor window.
   However, the editor selected might not be one you are familiar with.
   This can be terribly frustrating because you may not know how to get the
   editor to carry out any familiar task.
<P>
 
   You can determine the default editor by typing
<P>
 
<PRE>
   SHOW ENVIRONMENT
</PRE>
   If the editor listed there is not the one you prefer you can change to
   some other editor by typing
<P>
 
<PRE>
   SET EDITOR edit_launching_command
</PRE>
   where "edit_launching_command" is the command you type to invoke your
   favorite editor on your computer. If you use an alias for this command,
   you should look up what this alias translates to and use that
   translation.
<P>
 
<BR><BR>
<A NAME="Setting up Inspekt --- SET"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Setting up Inspekt --- SET
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Inspekt allows you to adjust the working session environment as well as
   the appearance of its outputs to suit your needs. You may control:
<P>
 
<UL>
<TT>1.</TT> the format of reports that result from the SELECT command;
<BR><BR></UL>
<UL>
<TT>2.</TT> the format used when printing time strings;
<BR><BR></UL>
<UL>
<TT>3.</TT> the width and justification(right/left) of columns that appear in reports;
<BR><BR></UL>
<UL>
<TT>4.</TT> the size of the "page" on which reports appear;
<BR><BR></UL>
<UL>
<TT>5.</TT> the frequency with which report titles and report headers appear.
<BR><BR></UL>
   To change current settings use the "SET" command. To examine current
   settings use the "SHOW" command. \subsection Related Topics
<P>
 
   Columns, Display Area, Reports, SET COLUMN, SET FORMAT, SET HEADER, SET
   PAGE, SET TIME, SET TITLE, Time Formats, Numeric Formats, Other
   Settings, Current Settings --- SHOW
<P>
 
<BR><BR>
<A NAME="Short Cut to Topics"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Short Cut to Topics
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   If you already know the title of a help topic you'd like to see, you
   don't have to navigate through the help systems series of menus.
   Instead, you can bring up the help topic immediately. To do this you add
   the topic title to the HELP command.
<P>
 
<PRE>
   Inspekt&gt; HELP topic title;
</PRE>
   where topic title is the title that appears in one of the help menus.
<P>
 
   You don't have to enter the title exactly as it appears in the help
   system menus. The help topic search does not depend upon the case of the
   letters you use. Also, you may use a wild card pattern for the topic
   title. This way you don't have to remember the exact topic. However, you
   do run a slight risk that some other help topic will match your pattern.
   If more than one topic matches the pattern, Inspekt will choose the one
   that occurs first in an alphabetical listing of the help topics.
<P>
 
   Once you are in the help system, you must use the menus to navigate the
   various help topics. You can not enter the name of some other topic and
   display it directly.
<P>
 
<BR><BR>
<A NAME="SHOW COLUMN ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SHOW COLUMN ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   You can get a snapshot of all of the attributes of a column (both the
   user adjustable attributes and fixed attributes) by issuing the command.
<P>
 
<PRE>
   SHOW COLUMN column_name;
</PRE>
   If more than one table possess a column with your name you must specify
   which column you are talking about. Do this by prefixing the table name
   to the column name as in
<P>
 
<PRE>
   SHOW COLUMN table.column_name
</PRE>
   where &lt;table&gt; is the name of the column of interest . Below is a
   possible result of the command SHOW COLUMN ACTIVITY;
<P>
 
<PRE>
   Attributes of column:     :  ACTIVITY
   Type                      :  CHARACTER*(32)
   Indexed                   :  YES
   Number of Components      :  1
 
   User Adjustable Attributes
   Column justification      :  LEFT
   Column width              :  32
   Column heading            :  ACTIVITY
</PRE>
<BR><BR>
<A NAME="Related Topics25"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   SET COLUMN
<P>
 
<BR><BR>
<A NAME="SHOW COMMENTS ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SHOW COMMENTS ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Every SPICE kernel provides a mechanism for the creator of the product
   to attach documentation to the kernel. This documentation is stored in a
   region of the file called the "comments" area. All kernels should have a
   non-empty comment section. The comments typically will provide
   information on one or more of the following items:
<P>
 
<UL>
<TT>1.</TT> the date the kernel was created,
<BR><BR></UL>
<UL>
<TT>2.</TT> who created it,
<BR><BR></UL>
<UL>
<TT>3.</TT> who to contact if you have questions about the kernel,
<BR><BR></UL>
<UL>
<TT>4.</TT> the intended set of users of the kernel,
<BR><BR></UL>
<UL>
<TT>5.</TT> special notes regarding the contents of the kernel.
<BR><BR></UL>
   To see the comments stored in a loaded E-kernel issue the command
<P>
 
<PRE>
   SHOW COMMENTS pattern
</PRE>
   If the name of a loaded kernel matches this pattern, the comments for
   that kernel will be displayed.
<P>
 
   If none of the kernel names match this pattern, a message informing you
   of this condition will be displayed. If a kernel matches the pattern,
   but no comments are in the kernel a message will be displayed indicating
   that no comments are available.
<P>
 
<BR><BR>
<A NAME="SHOW ENVIRONMENT ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SHOW ENVIRONMENT ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   There are a number of more or less global features of an Inspekt session
   that affect how Inspekt carries out the commands you issue. These items
   are grouped together under the term Environment. They include:
<P>
 
<UL>
<TT>1.</TT> The editor used when you EDIT a command.
<BR><BR></UL>
<UL>
<TT>2.</TT> Whether or not Help waits for you to finish reading a page before it prints
the next screen out material
<BR><BR></UL>
<UL>
<TT>3.</TT> What leapsecond and SCLK kernels are loaded
<BR><BR></UL>
   To see the current session environment, type the command
<P>
 
<PRE>
   SHOW ENVIRONMENT
</PRE>
<BR><BR>
<A NAME="Related Topics26"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Making Help Wait, Echoing Translated Commands, Kernels --- LOAD
<P>
 
<BR><BR>
<A NAME="SHOW FORMAT ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SHOW FORMAT ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   You can see what report format is currently active by typing the
   command:
<P>
 
<PRE>
   SHOW FORMAT;
</PRE>
   In addition to showing you the format, it will show you the current
   format being used for presenting time and in the case of MARKED TABULAR
   format the current format mark. You will also be given the current value
   for triggering a data DELUGE WARNING. An example result is given here.
<P>
 
<PRE>
   Report Format          :  MARKED TABULAR
   Report Mark            :  '&gt;'
   Default Time     Format:  YYYY MON DD HR:MN:SC::UTC::RND
   Default Integer  Format:  ###########
   Default Floating Format:  #########.####
   Deluge Warning         :  100
   Auto Adjust            :  ASK (applies only to tabular formats)
</PRE>
<BR><BR>
<A NAME="Related Topics27"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Default Floating Format, Default Integer Format, Default Time Format
<P>
 
<BR><BR>
<A NAME="SHOW INDEXED ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SHOW INDEXED ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When you issue a select command to Inspekt, the speed with which it is
   executed may depend upon whether the columns referenced in the select
   command are indexed.
<P>
 
   To get a list of all indexed columns, type the command
<P>
 
<PRE>
   SHOW INDEXED
</PRE>
<BR><BR>
<A NAME="SHOW KERNELS ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SHOW KERNELS ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   You can create a summary of the loaded E-kernels by typing the command
<P>
 
<PRE>
   SHOW KERNELS;
</PRE>
   There are two main reasons for issuing this command:
<P>
 
<UL>
<TT>1.</TT> Obtaining a quick summary of loaded kernels
<BR><BR></UL>
<UL>
<TT>2.</TT> Finding out whether the tables and kernels you thought you loaded were in
fact loaded by Inspekt.
<BR><BR></UL>
<BR><BR>
<A NAME="Related Topics28"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   SHOW COMMENTS
<P>
 
<BR><BR>
<A NAME="SHOW PAGE ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SHOW PAGE ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   You can see the current page settings (including the report title and
   header attributes) by typing the command:
<P>
 
<PRE>
   SHOW PAGE;
</PRE>
   A sample output is given below. (Note: the Page width refers to number
   of columns one character wide will fit on the page.)
<P>
 
<PRE>
   Page height (rows)   :  20
   Page width  (columns):  80
 
   Page Title           :  Inspekt Report
   Title Justification  :  LEFT
   Title Appears on     :  First page only
 
   Header Appears on    :  First page only
</PRE>
<BR><BR>
<A NAME="SHOW SUMMARY ..."></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> SHOW SUMMARY ...
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   To see a summary of the characteristics of all columns for all loaded
   events kernels, type the command
<P>
 
<PRE>
   SHOW SUMMARY;
</PRE>
   Inspekt will display an alphabetical listing of all columns
<P>
 
<BR><BR>
<A NAME="Special Symbols --- Queries"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Special Symbols --- Queries
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   In addition to symbols you define, there are special symbols called
   "queries" that have no permanent value. You supply the value of a query
   when a command containing it is issued. A query is any word beginning
   with a letter and ending with a question mark (?). Whenever, such a word
   is encountered in a command, Inspekt asks you to supply a value for the
   query. You should enter the value followed by a semicolon (;).
<P>
 
   Here's an example. Suppose you routinely issue some select command and
   that the only portion that changes is the constraint upon the column
   time.
<P>
 
<PRE>
   SELECT TIME, COMMENTS
   FROM EVENTLIST
   WHERE TIME variable condition
   ORDER BY TIME;
</PRE>
   Define the following symbols
<P>
 
<PRE>
   DEFINE STDSEL SELECT TIME, COMMENTS FORM EVENTLIST WHERE TIME
          After_Before_Tween? ORDER BY TIME;
   DEFINE AFTER  GT TIME?
   DEFINE BEFORE LT TIME?
   DEFINE TWEEN  BETWEEN FIRST_TIME? AND LAST_TIME?
</PRE>
   Here's what happens when we now type STDSEL;
<P>
 
<PRE>
   Inspekt&gt; STDSEL;
</PRE>
   Inspekt responds with the following prompt.
<P>
 
<PRE>
   Enter value for After_Before_Tween &gt;
</PRE>
   You can type anything at this prompt. However the prompt suggests you
   should pick one of the symbols you define earlier. Type "before"
   followed by a semi-colon.
<P>
 
<PRE>
   Enter value for After_Before_Tween &gt; before;
   Enter value for TIME &gt;
</PRE>
   Now enter some time (be sure to put it in quotes) and follow this with a
   semi-colon.
<P>
 
<PRE>
   Enter value for After_Before_Tween &gt; before;
   Enter value for TIME &gt; "1 jan 1995";
</PRE>
   The effect of these three entries is
<P>
 
<PRE>
   SELECT TIME, COMMENTS FROM EVENTLIST
   WHERE TIME LT "1 jan 1995"
   ORDER BY TIME;
</PRE>
   By creative use of symbols and queries you can greatly alter your view
   of Inspekt and greatly ease the entry of frequently typed commands.
<P>
 
<BR><BR>
<A NAME="Specifying Strings"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Specifying Strings
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   When you create SELECT commands you will often need to compare a
   character column to some specified string. To specify a string you must
   enclose it in either single (') or double (") quotes. (Note that these
   are both single characters. You cannot use '' in place of ".) For
   example, you might want to find all of the rows for which a character
   column begins with the letter 'A'. To specify this condition in a query
   you would type:
<P>
 
<PRE>
   column GE 'A' AND column LE 'B'
</PRE>
   If you need to put a quote into a string, you type double the quote as
   you would in a FORTRAN string. For example the word DOESN'T would be
   typed as
<P>
 
<PRE>
   'DOESN''T'
</PRE>
<BR><BR>
<A NAME="Related Topics29"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Specifying Times
<P>
 
<BR><BR>
<A NAME="Specifying Times"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Specifying Times
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Although Inspekt can display times in almost any format, the set of
   inputs is necessarily more restrictive.
<P>
 
   First, time strings need to be input as strings. Strings must be
   enclosed in quotes. The condition
<P>
 
<PRE>
   TIME LT 1 JAN 1995
</PRE>
   will not be recognized if it is part of a SELECT command. However, once
   you place quotes around the time, the time string will be recognized
<P>
 
<PRE>
   TIME LT "1 JAN 1995"
</PRE>
   A wide variety of time formats are allowed as input to Inspekt. These
   formats are listed below.
<P>
 
<BR><BR>
<A NAME="Spacecraft Clock"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Spacecraft Clock
</H3><P><BR><BR>
<PRE>
   MO   SCLK mars observer spacecraft clock string
   GLL  SCLK galileo spacecraft clock string
   VGR1 SCLK voyager 1 spacecraft clock string
   VGR2 SCLK voyager 2 spacecraft clock string
</PRE>
   To use these formats you must have either specified SCLK to be an
   appropriate kernel (see Getting Started) or have loaded an appropriate
   kernel via the LOAD SCLK KERNEL command.
<P>
 
<BR><BR>
<A NAME="ISO Formats"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> ISO Formats
</H3><P><BR><BR>
   The International Standards Organization (ISO) time format is used by
   many NASA flight projects.
<P>
 
<PRE>
   YYYY-MM-DDTHR:MN:SC    ISO UTC Calendar format
   YYYY-DDDTHR:MN:SC      ISO UTC Day of year format
</PRE>
<BR><BR>
<A NAME="Generic"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Generic
</H3><P><BR><BR>
   In these formats Month stands for the month spelled out to 3 or more
   letters, e.g. Jan, Janu, Janua, etc. Also note that where spaces have
   been used to separate the components of the date you may also use a
   comma or a slash (i.e. the solidus (/) ). All times are UTC.
<P>
 
<PRE>
   MONTH DD YYYY  HR:MN:SC.##...#
   DD MONTH YYYY  HR:MN:SC.##...#
   YYYY DD MONTH  HR:MN:SC.##...#
   YYYY MONTH DD  HR:MN:SC.##...#
 
   YYYY MM DD HR:MN:SC.##...#
   MM DD YYYY HR:MN:SC.##...#
 
   JD244xxxx.xx...x
</PRE>
<BR><BR>
<A NAME="Related Topics30"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Where Clause
<P>
 
<BR><BR>
<A NAME="Symbol"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Symbol
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   A symbol is a word that begins with a letter of the alphabet and does
   not end with a question mark. It must be 32 or fewer characters in
   length. Moreover, you must specifically designate this word to be a
   symbol via the DEFINE command. The define command associates a value
   with the symbol.
<P>
 
   When you type a command in Inspekt that contains a symbol, the symbol is
   replaced by its associated value. The command is then re-examined and
   any remaining symbols are replaced by their associated values.
<P>
 
   Symbols allow you to customize your Inspekt environment. In addition
   they allow you to greatly reduce the amount of typing you need to do in
   order to issue frequently occurring groups of words.
<P>
 
   Words that are surrounded by any of the characters ("'@) are not
   regarded as symbols and are processed as they appear.
<P>
 
   Symbols are case insensitive in Inspekt. If you define "SPUD" to be a
   symbol then "spud", "Spud", "sPud", etc. will all be interpreted as
   SPUD.
<P>
 
   You may not define EDIT, DO, RECALL, START, STOP, DEFINE, ECHO
<P>
 
<BR><BR>
<A NAME="Syntax Description Language"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Syntax Description Language
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   The language you use to communicate with Inspekt is a word oriented
   language. With one exception the smallest significant component of a
   command is a word. The words in a command must match a pattern that is
   called the syntax of the command. The syntax of the commands you type at
   the prompt Inspekt&gt; can be expressed in a language called Meta/2. The
   sections below describe the various constructs that make up a Meta/2
   specification. After reading these sections you should be able to make
   sense of any syntax specification presented later in this User's Guide.
<P>
 
   Inspekt's command language is quite simple; it does not require all of
   the features of Meta/2. But since Inspekt is expected to grow, we've
   included a complete description of Meta/2 so that you'll have a handy
   reference as this growth occurs.
<P>
 
<BR><BR>
<A NAME="Keywords"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Keywords
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   Each command you type at the prompt Inspekt&gt; must begin with a
   keyword. Keywords define the structure of a command: for the most part,
   a command is a collection of keywords, some of which are modified by
   non-keyword arguments. The keywords of a Meta/2 syntax description are
   the words that do not begin with one of the special characters in the
   list below:
<P>
 
<PRE>
   "("   the left parenthesis
   "@"   the "at" sign
   "|"   the vertical bar
   "}"    the right  brace
</PRE>
   In Inspekt all of the keywords are english words.
<P>
 
   The simplest Meta/2 expressions consist entirely of keywords. Some of
   Inspekt's commands that fall into this category are shown below.
<P>
 
<PRE>
   SHOW KERNELS
 
   SHOW SUMMARY
 
   SHOW INDEXES
 
   SET AUTOADJUST ON
 
   SET FORMAT TABULAR
 
   SET FORMAT FLAGGED PRESERVED
 
   SET FORMAT VERBATIM
 
   SET TITLE FREQUENCY ALL
 
   SET HEADER FREQUENCY FIRST
</PRE>
   When you type a command, you may enter the keywords in upper, lower or
   mixed case.
<P>
 
<BR><BR>
<A NAME="Class Templates"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Class Templates
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   Keywords can be modified by non-keyword values. The values associated
   with a keyword always immediately follow that keyword. A collection of
   values is terminated by another keyword, or by the end of the command.
<P>
 
   Class templates are used to indicate that the values associated with a
   particular keyword belong to a class of values. For example the Meta/2
   expression of the rule that the keywords SHOW COLUMN are to be followed
   by the name of a column looks like this.
<P>
 
<PRE>
   SHOW COLUMN @name ...
</PRE>
   The word, name, indicates that the next word in the command following
   COLUMN should begin with a letter followed by characters from the
   collection: upper and lower case letters, digits, the hyphen and the
   underscore. Given this rule, a command that begins
<P>
 
<PRE>
   SHOW COLUMN 13 ...
</PRE>
   is clearly in error.
<P>
 
   Class templates are very much like the wild card templates used in
   operating systems like Unix and VMS, except they are a little more
   specialized. The class templates recognized by Meta/2 are listed below
   along with descriptions of the words that match them. Class templates in
   a Meta/2 description begin with the "at" character (@).
<P>
 
<BR><BR>
<A NAME="number"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> number
</H3><P><BR><BR>
   This template matches any number. Examples are
<P>
 
<PRE>
   1
   3.14
   0.07281D-10
</PRE>
<BR><BR>
<A NAME="int"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> int
</H3><P><BR><BR>
   This template matches only integer values. Examples are
<P>
 
<PRE>
   -3
   26172771
   0.24E6
</PRE>
<BR><BR>
<A NAME="word"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> word
</H3><P><BR><BR>
   This template matches any string of contiguous, non-blank, printing
   characters. Examples are
<P>
 
<PRE>
   alpine
   /u/user/naif/etc/data/spam
   ^&amp;HANNk228***(JASNSK
</PRE>
<BR><BR>
<A NAME="name"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> name
</H3><P><BR><BR>
   This template matches any word that begins with a letter and contains
   from one to 32 letters, numbers, underscores, and hyphens. Examples are
<P>
 
<PRE>
   Andrea
   BRORSEN-METCALF
   COMMAND_STEM
   X11J9
</PRE>
<BR><BR>
<A NAME="calendar"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> calendar
</H3><P><BR><BR>
   This template matches a sequence of words that make up a calendar date.
   The rules for matching this template are somewhat complicated: for the
   most part, any unambiguous format will be accepted. Examples are
<P>
 
<PRE>
   JAN 1, 1992 12:28:28
   1992-3-18 18:28
   5 APR 1993 18:00:00.289
   12-1-1995
</PRE>
<BR><BR>
<A NAME="Template Quantifiers"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Template Quantifiers
</H3><P><BR><BR>
   The construct
<P>
 
<PRE>
   FORMAT (1:8)@word
</PRE>
   matches the keyword FORMAT followed by between one and eight words. The
   quantifier
<P>
 
<PRE>
   (n:m)
</PRE>
   when prefixed to any class template has similar meaning. The lower bound
   is always present, and is always positive. The upper bound is optional:
   for example, template
<P>
 
<PRE>
   (2:)@int
</PRE>
   matches any sequence of two or more integer words.
<P>
 
<BR><BR>
<A NAME="Numeric Qualifiers"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Numeric Qualifiers
</H3><P><BR><BR>
   The construct
<P>
 
<PRE>
   WIDTH @int(8:80)
</PRE>
   matches the keyword WIDTH followed by an integer between 8 and 80
   inclusive. The qualifier
<P>
 
<PRE>
   (n:m)
</PRE>
   when suffixed to any numeric class template has similar meaning. Both
   bounds are optional: for example the templates
<P>
 
<PRE>
   @number(2:)
   @number(:1000)
</PRE>
   are matched by numeric words whose values are greater than or equal to
   two and less than or equal to 1000 respectively.
<P>
 
<BR><BR>
<A NAME="Character Qualifiers"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Character Qualifiers
</H3><P><BR><BR>
   The construct
<P>
 
<PRE>
   DIRECTORY @word([*]|*%:[*]|*:)
</PRE>
   matches any word that matches one of the individual wildcard templates
<P>
 
<PRE>
   [*]
 
   *%:[*]
 
   *:
</PRE>
   The wildcard characters (asterisk and percent sign) match any substring
   and any character respectively. The qualifier
<P>
 
<PRE>
   (t1|...|tn)
</PRE>
   when suffixed to any character class template has a similar meaning.
<P>
 
<BR><BR>
<A NAME="Combining Quantifiers with Qualifiers"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Combining Quantifiers with Qualifiers
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   Quantifiers and qualifiers may be combined in any combination. The
   following are all valid class templates.
<P>
 
<PRE>
   @int(-5:5)
 
   (3:)@name(A*|B*|*X)
 
   (1:3)@name(John|Bobby|Teddy)
</PRE>
<BR><BR>
<A NAME="Switches"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Switches
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   The construct
<P>
 
<PRE>
       (1:1){ NONE
            | FIRST
            | 1ST
            | ALL
            | EVERY @int(2:) }
</PRE>
   is called a switch. It is the final construct that you need to know.
   Although it looks forbidding, it is really quite simple. A switch is a
   list of keyword-template phrases, separated by vertical bars, and
   surrounded by braces. The left brace is prefixed with a quantifier,
<P>
 
<PRE>
      (n:m){ ... }
</PRE>
   Whenever you see a switch, it means that at least n and not more than m
   of the phrases separated by vertical bars must appear; however, they may
   appear in any order. Thus, the syntax
<P>
 
<PRE>
   SET TITLE FREQUENCY (1:1){ NONE
                            | FIRST
                            | 1ST
                            | ALL
                            | EVERY @int(2:) }
</PRE>
   matches all of the following commands.
<P>
 
<PRE>
   SET TITLE FREQUENCY FIRST
 
   SET TITLE FREQUENCY EVERY 3
 
   SET TITLE FREQUENCY ALL
</PRE>
   but does not match
<P>
 
<PRE>
   SET TITLE FREQUENCY NONE FIRST ALL EVERY @int(2:)
</PRE>
   When you see the special word
<P>
 
<PRE>
   @options
</PRE>
   within a switch, it means that the phrases following the token are
   optional, whereas the phrases preceding the token are required (again,
   the phrases may appear in any order). For example the construct
<P>
 
<PRE>
      (2:3){         WIDTH  @int(40:132)
           |         HEIGHT @int(22:)
           | @options
           |         TITLE (1:3)@word }
</PRE>
   means that the phrases beginning with the keywords WIDTH and HEIGHT must
   appear, while the phrase beginning with TITLE is optional.
<P>
 
<BR><BR>
<A NAME="Nesting Switches"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Nesting Switches
</H3><P><BR><BR>
   Switches cannot be nested. The construct
<P>
 
<PRE>
      (a:b){ ...
           | (c:d){ ...  }
           }
</PRE>
   is illegal.
<P>
 
<BR><BR>
<A NAME="Examples"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Examples
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   Given the syntax description
<P>
 
<PRE>
      SET FORMAT (0:1){ SPACED  | MARKED } TABULAR
                 (0:1){ PRESERVED }
</PRE>
   Convince yourself that the following are all valid commands.
<P>
 
<PRE>
   SET FORMAT TABULAR;
 
   SET FORMAT SPACED TABULAR;
 
   SET FORMAT MARKED TABULAR PRESERVED;
 
   SET FORMAT TABULAR PRESERVED;
 
   SET FORMAT SPACE TABULAR PRESERVED;
</PRE>
   Convince yourself that the following are not valid commands.
<P>
 
<PRE>
   SET FORMAT SPACED;
 
   SET FORMAT PRESERVED TABULAR;
 
   SET FORMAT MARKED PRESERVED;
</PRE>
<BR><BR>
<A NAME="Syntax Summaries"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Syntax Summaries
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Listed here is the formal syntax for every command recognized by
   Inspekt.
<P>
 
<PRE>
   DEFINE   @name
   DEFINE   @name (1:)@word
   UNDEFINE @name
 
   DISCARD
 
   DO @word
 
   ECHO
   NO ECHO
 
   EDIT @word
 
   EXIT
   HELP
   LOAD EK @word
   LOAD LEAPSECONDS @word
   LOAD SCLK KERNEL @word
 
   RECALL
   RECALL @word
 
   SAVE TO @word
 
   SAMPLE @int(1:)  SELECT (1:100)@word
                    FROM   (1:)@word
                   (0:1){ WHERE    (1:)@word    }
                   (0:1){ ORDER BY (1:100)@word }
 
 
   SAMPLE          (1:1){ FIRST @int(1:)
                        | LAST  @int(1:)
                        }
                    SELECT (1:100)@word
                    FROM   (1:)@word
                   (0:1){ WHERE    (1:)@word    }
                   (0:1){ ORDER BY (1:100)@word }
 
 
   SAMPLE @int(1:) (1:1){ UP TO       @int(0:100) EVERY @int(1:)
                        | UP TO       @int(0:100)
                        | STARTING AT @int(0:100) EVERY @int(1:)
                        | STARTING AT @int(0:100)
                        | CENTER   AT @int(0:100) EVERY @int(1:)
                        | CENTER   AT @int(0:100)
                        | FROM @int(0:100) TO   @int(0:100)
                        }
                    SELECT (1:100)@word
                    FROM   (1:)@word
                   (0:1){ WHERE    (1:)@word    }
                   (0:1){ ORDER BY (1:100)@word }
 
 
   SELECT (1:100)@word FROM (1:)@word
                       (0:1){ WHERE    (1:)@word    }
                       (0:1){ ORDER BY (1:100)@word }
 
 
 
   SET AUTOADJUST (1:1){ OFF | ASK | ON }
   SET COLUMN @word FORMAT (1:)@word }
   SET COLUMN @word HEADING (1:)@word
   SET COLUMN @word JUSTIFICATION (1:1){ LEFT  | JUSTIFICATION }
   SET COLUMN @word WIDTH @int
   SET DEFAULT TIME     FORMAT (1:)@word
   SET DEFAULT INTEGER  FORMAT @word
   SET DEFAULT FLOATING FORMAT @word
   SET DELUGE WARNING @int(1:)
   SET EDITOR (1:)@word
   SET FORMAT (0:1){ SPACED | MARKED } TABULAR (0:1){ PRESERVED }
   SET FORMAT FLAGGED (0:1){ PRESERVED }
   SET FORMAT MARK @word(%)
   SET FORMAT VERBATIM
 
   SET HEADER FREQUENCY (1:1){ 0
                             | FIRST | 1ST
                             | ALL
                             | EVERY @int(2:) }
 
   SET HELP WAIT
   SET HELP NO WAIT
   SET PAGE HEIGHT @int
   SET PAGE TITLE (1:)@word
   SET PAGE WIDTH @int
 
   SET TITLE FREQUENCY (1:1){ 0
                            | FIRST | 1ST
                            | ALL
                            | EVERY @int(2:) }
 
   SET TITLE JUSTIFICATION (1:1){ LEFT | CENTER | RIGHT }
   SHOW COLUMN @word
   SHOW COMMENTS
   SHOW COMMENTS @word
   SHOW ENVIRONMENT
   SHOW FORMAT
   SHOW INDEXES
   SHOW KERNELS
   SHOW PAGE
   SHOW SYMBOL @word
   SHOW SUMMARY
   START @word
   UNLOAD @word
</PRE>
<BR><BR>
<A NAME="Related Topics31"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Syntax Description Language
<P>
 
<BR><BR>
<A NAME="Table"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Table
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   A "table" is a named grouping of events (or other objects) all of which
   have the same named attributes.
<P>
 
   The designation "table" comes from the appearance of listings of the
   attributes of events. If we list all of the events we have recorded on a
   sheet of paper (or a terminal) so that the attributes for each event are
   always listed in the same order from left to right, the resulting page
   will look like a "table" of values similar to a table of sines and
   cosines or a table of prices.
<P>
 
<BR><BR>
<A NAME="Tabular Format"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Tabular Format
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Inspekt provides a number of different Tabular formats.
<P>
 
<BR><BR>
<A NAME="TABULAR"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> TABULAR
</H3><P><BR><BR>
<PRE>
   JAN 25 07:15:00  OBSERVATION   WEATHER  Sunny and cool (about 55 F)
                                           Air Quality good.
   JAN 26 07:15:00  OBSERVATION   WEATHER  Sunny and cool (about 52 F)
</PRE>
<BR><BR>
<A NAME="MARKED TABULAR"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> MARKED TABULAR
</H3><P><BR><BR>
<PRE>
   &gt; JAN 25 07:15:00  OBSERVATION WEATHER  Sunny and cool (about 55 F)
                                           Air Quality good.
   &gt; JAN 26 07:15:00  OBSERVATION WEATHER  Sunny and cool (about 52 F)
 
</PRE>
<BR><BR>
<A NAME="SPACED TABULAR"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> SPACED TABULAR
</H3><P><BR><BR>
<PRE>
   JAN 25 07:15:00  OBSERVATION   WEATHER  Sunny and cool (about 55 F)
                                           Air Quality good.
 
   AN 26 07:15:00  OBSERVATION    WEATHER  Sunny and cool (about 52 F)
</PRE>
<BR><BR>
<A NAME="Related Topics32"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Reports, Tabular Format Mark
<P>
 
<BR><BR>
<A NAME="Tabular Format Mark"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Tabular Format Mark
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   The format of a marked tabular report is similar to that of a tabular
   report. However, an extra column is inserted at the left side of the
   report. A format mark appears in this column when each new row is begun.
   You can quickly scan the left most column of the report and determine
   where each new row begins. The default format mark is the "greater than"
   symbol (&gt;). To change this default to some other character, use the
   SET FORMAT MARK command.
<P>
 
<PRE>
   SET FORMAT MARK character
</PRE>
   where "character" is the character you would like to replace '&gt;'.
<P>
 
   NOTE: the format character cannot be a semi-colon.
<P>
 
   For example suppose that you would like to change the format mark from
   '&gt;' to '='. Type the command
<P>
 
<PRE>
   SET FORMAT MARK =;
</PRE>
<BR><BR>
<A NAME="Related Topics33"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Tabular Format
<P>
 
<BR><BR>
<A NAME="Time Formats"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Time Formats
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   You may request time to be displayed in an almost limitless variety of
   formats. The default format is UTC calendar format. Other standard
   formats may be set by using either of the commands:
<P>
 
<PRE>
   SET COLUMN column_name FORMAT format;
   SET DEFAULT TIME FORMAT format;
</PRE>
   A number of standard formats may be specified:
<P>
 
<DL><DT>
<B>
 UTC
</B><BR><BR>
<DD>
 Default format: YYYY-MON-DD HR:MN:SC<BR>
</DL>
<DL><DT>
<B>
 ISO
</B><BR><BR>
<DD>
 International Standards format: YYYY-MM-DDTHR:MN:SC<BR>
</DL>
<DL><DT>
<B>
 ISODOY
</B><BR><BR>
<DD>
 International Standards day of year: YYYY-DOYTHR:MN:SC<BR>
</DL>
<DL><DT>
<B>
 JED
</B><BR><BR>
<DD>
 Julian Ephemeris date to 5 decimal places<BR>
</DL>
<DL><DT>
<B>
 MOSCLK
</B><BR><BR>
<DD>
 Mars Observer Spacecraft Clock format<BR>
</DL>
<DL><DT>
<B>
 GLLSCLK
</B><BR><BR>
<DD>
 Galileo Spacecraft Clock format<BR>
</DL>
   These formats will be recognized regardless of the case of the letters
   use to specify them. The UTC, ISO and ISODY formats are all UTC times.
   You may also create a custom format (see Custom Formats). \subsection
   Related Topics
<P>
 
   Custom Formats, Default Time Format
<P>
 
<BR><BR>
<A NAME="Titles"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Titles
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Titles are single lines of text that appear at the beginning of Inspekt
   reports. You may adjust the text of the title, its positioning (left
   justified, centered, or right justified), and how often it is shown as a
   report is displayed. To see the current attributes of the report title,
   type
<P>
 
<PRE>
   SHOW PAGE
</PRE>
<BR><BR>
<A NAME="Typing Commands"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Typing Commands
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Inspekt is a command driven program. You type a command at the prompt
<P>
 
<PRE>
   Inspekt&gt;
</PRE>
   The program performs some action based upon the typed command. If a
   command is too long to fit on a single line, hit the return key when you
   get to the end of the line and continue typing on the next line. When
   you are finished typing the command, type a semi-colon (";"). The
   semi-colon is required at the end of all commands typed in response to a
   prompt ending with "&gt;". It is needed even if the line will fit on a
   single line. Occasionally, Inspekt may prompt you to supply inputs other
   than commands (such as in the Help system). In such cases the prompt
   will not end in a greater than sign "&gt;" and the semi-colon is not
   needed.
<P>
 
   The commands you type may be in either upper or lower case.
<P>
 
   If you begin typing a command and realize you've made an error or wish
   to start again, add a blank line to the command entered so far. Inspekt
   will ignore what you've typed and prompt you for a new command.
   \subsection Related Topics
<P>
 
   Editing Commands, Column and Table Abbreviations, Using Symbols, Special
   Symbols --- Queries, Collecting Commands In Files
<P>
 
<BR><BR>
<A NAME="Using Symbols"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Using Symbols
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
<BR><BR>
<A NAME="An Example"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> An Example
</H3><P><BR><BR>
   Inspekt allows you to create special words that when encountered in a
   command are translated into different words. These special words are
   called 'symbols'.
<P>
 
   For example suppose that you frequently want to edit your last "Select"
   command. You could make up the symbol ES as shown below:
<P>
 
<PRE>
   DEFINE ES EDIT SELECT;
</PRE>
   When you type
<P>
 
<PRE>
   Inspekt&gt; ES;
</PRE>
   The command is translated to
<P>
 
<PRE>
   EDIT SELECT
</PRE>
   If you have recently issued a select command, the command will be copied
   into the editor so that you may perform any desired modifications.
<P>
 
<BR><BR>
<A NAME="Creating Symbols"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Creating Symbols
</H3><P><BR><BR>
   You may use symbols to stand for any group of words that you would like
   to avoid typing repeatedly. To define a symbol type:
<P>
 
<PRE>
   DEFINE symbol_name value;
</PRE>
   where "symbol_name" is the name of the symbol you want to define and
   "value" is the associated list of words and characters. The value of a
   symbol may be blank. Symbol names must begin with a letter and can not
   end with a question mark '?'. Also the case of letters in a symbol is
   insignificant. For example, the commands
<P>
 
<PRE>
   DEFINE MYSYM a string of words;
   DEFINE MySym a string of words;
   DEFINE mysym a string of words;
</PRE>
   all define the symbol MYSYM. Moreover, when symbols appear in a command,
   the case of the letters is insignificant. The commands
<P>
 
<PRE>
   SET FORMAT MYSYM;
   SET FORMAT MySym;
   SET FORMAT mysym;
</PRE>
   will all be recognized as containing the symbol MYSYM.
<P>
 
<BR><BR>
<A NAME="Removing Symbols"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Removing Symbols
</H3><P><BR><BR>
   To remove a symbol definitions type:
<P>
 
<PRE>
   UNDEFINE symbol_name
</PRE>
   Note that you can "undefine" a symbol that has not been defined. This is
   useful in Inspekt Procedure Files when you want to make sure that some
   previously defined symbol will not accidentally alter the meaning of a
   procedure command.
<P>
 
<BR><BR>
<A NAME="Symbols Used in Other Symbols"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Symbols Used in Other Symbols
</H3><P><BR><BR>
   You may use symbols in the definition of another symbol. For example,
<P>
 
<PRE>
   DEFINE P PRESERVED;
   DEFINE M MARKED;
   DEFINE TAB TABULAR;
   DEFINE SETF SET FORMAT
   DEFINE MYFMT SETF M TAB P;
</PRE>
   When you type
<P>
 
<PRE>
   Inspekt&gt; MYFMT;
</PRE>
   The effect will be the same as if you had typed
<P>
 
<PRE>
   SET FORMAT MARKED TABULAR PRESERVED;
</PRE>
   Symbols are not evaluated until they are encountered in a command.
   Moreover, symbol substitution is performed until no more symbols are
   found in the string.
<P>
 
   As a result of this "evaluate when encountered" strategy you can change
   the value of MYFMT to mean SET FORMAT MARKED TABULAR by redefining P to
   be a blank.
<P>
 
<PRE>
   DEFINE P  ;
</PRE>
   In addition to saving you typing, symbols offer a mechanism for passing
   information to Inspekt Procedures. If a procedure needs some variable
   piece of information, you can write the procedure so that this
   information is expected to be present in some symbol. Then create the
   symbol with the appropriate information before starting the procedure
   that needs it.
<P>
 
<BR><BR>
<A NAME="Suppressing Symbols Substitution"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Suppressing Symbols Substitution
</H3><P><BR><BR>
   Occasionally you may want to make sure that a word does not get mistaken
   for a symbol. If the word is enclosed in single (') or double (") quotes
   it is automatically invisible to the symbol translation subsystem. Thus
   words in quoted strings are never mistaken for symbols. In addition to
   these words you can make one or more words invisible to the symbol
   resolver by placing it between consecutive '@' characters. Thus the
   command below sets the page title to be "MYFMT" even though MYFMT is a
   symbol defined above
<P>
 
<PRE>
   SET PAGE TITLE @MYFMT@;
</PRE>
<BR><BR>
<A NAME="Examining Symbols"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Examining Symbols
</H3><P><BR><BR>
   After working in Inspekt for some time, you may want to see what symbols
   you've created. Type
<P>
 
<PRE>
   SHOW SYMBOL pattern
</PRE>
   to see the definition and full evaluation of all symbols whose names
   match the supplied pattern. \subsection Related Topics
<P>
 
   Echoing Translated Commands, Collecting Commands In Files, Special
   Symbols --- Queries, Column and Table Abbreviations
<P>
 
<BR><BR>
<A NAME="Verbatim Format"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Verbatim Format
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   The VERBATIM format allows you to capture in a report the explicit
   components that were supplied to each column at the time an event was
   recorded. Each component will appear on a separate line in the report.
   An example appears below:
<P>
 
<PRE>
   --- TIME     ---
   JAN 25 18:29:59
   --- ACTIVITY ---
   OBSERVATION
   --- SUBCLASS ---
   GOOD AIR QUALITY
   --- COMMENTS ---
   The air quality is good.
   Smog has not been a problem for several days now.
</PRE>
<BR><BR>
<A NAME="Related Topics34"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Reports
<P>
 
<BR><BR>
<A NAME="Where Clause"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Where Clause
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   The "WHERE" clause of a SELECT command allows you to narrow focus on a
   particular set of events. The form of the WHERE-clause is:
<P>
 
<PRE>
   WHERE condition
   AND/OR (NOT) condition
            ...
   AND/OR (NOT) condition
</PRE>
   With one exception A condition is an expression of the form:
<P>
 
<PRE>
   column_name  binary_relation  value/column
   or
   column_name  [NOT] BETWEEN value1/column AND value2/column
</PRE>
   Only names of columns from loaded kernels may be specified. The columns
   must be scalar valued. If the column specified in a relation is a
   character or time column, VALUE must be enclosed in single (') or double
   (") quotes.
<P>
 
   The binary relations are: NE, LT, LE, EQ, GE, GT, LIKE, NOT LIKE. The
   short hand equivalents of the first 6 of these are !=, &lt;, &lt;=, =,
   &gt;=, &gt;. All but the LIKE relation can be used with any column. The
   LIKE relation can be used only with character columns; it is the pattern
   matching relation. The value to the right of a LIKE relation is a
   pattern that the column must match. The character '*' matches any
   substring of of any string. The character '% ' matches any single
   character.
<P>
 
   Conditions may be grouped using parentheses. These groups may in turn be
   grouped using parentheses and the connecting words AND and OR. Any
   condition can be negated using the word NOT.
<P>
 
<BR><BR>
<A NAME="Related Topics35"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Related Topics
</H3><P><BR><BR>
   Example Where Clause, Conditional Operators, Looking at Data --- SELECT
<P>
 
<BR><BR>
<A NAME="Problems, Suggestions"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> Problems, Suggestions
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   If you have a problem that you can't figure out on your own, you can
   send it to NAIF at the e-mail address given below. However, please send
   Inspekt's log file along with a description of the problem. The log file
   allows us to reproduce the problem. We may also need to request a copy
   of the E-kernels you were using at the time you experienced the problem.
<P>
 
   If you have comments or suggestions regarding Inspekt, send them to
<P>
 
<PRE>
   btaber@spice.jpl.nasa.gov
</PRE>
   Within the limits of time and money, we will do our best to respond to
   your correspondence.
<P>
 
<PRE>
         ---Bill Taber
</PRE>

</TD>
</TR>
</TBODY>
</TABLE>

</BODY>

</HTML>
